diff --git a/public/assets/full_style.xslt b/public/assets/full_style.xslt index 99b07d2..a4ceba4 100644 --- a/public/assets/full_style.xslt +++ b/public/assets/full_style.xslt @@ -64,4 +64,4 @@ - \ No newline at end of file + diff --git a/slices/admin/decorators/posts/decorator.rb b/slices/admin/decorators/posts/decorator.rb index 26577e0..a5b4ede 100644 --- a/slices/admin/decorators/posts/decorator.rb +++ b/slices/admin/decorators/posts/decorator.rb @@ -81,7 +81,11 @@ module Admin def display_title title = name - "#{prefix_emoji} #{title}" + if prefix_emoji + return "#{prefix_emoji} #{title}" + else + return title + end end def display_published_at diff --git a/slices/main/decorators/posts/decorator.rb b/slices/main/decorators/posts/decorator.rb index 4384a20..028d606 100644 --- a/slices/main/decorators/posts/decorator.rb +++ b/slices/main/decorators/posts/decorator.rb @@ -85,7 +85,11 @@ module Main def display_title title = name - "#{prefix_emoji} #{title}" + if prefix_emoji + return "#{prefix_emoji} #{title}" + else + return title + end end def display_published_at diff --git a/slices/main/templates/feeds/rss.xml.builder b/slices/main/templates/feeds/rss.xml.builder index 659db53..cace87e 100644 --- a/slices/main/templates/feeds/rss.xml.builder +++ b/slices/main/templates/feeds/rss.xml.builder @@ -1,35 +1,37 @@ xml.instruct! "xml-stylesheet", {href: "/assets/full_style.xslt", type: "text/xsl"} -xml.channel do |channel| - channel.title "Daniel Nitsikopoulos" - channel.description "The personal blog of Daniel Nitsikopoulos, software engineer from Canberra, ACT" - channel.link "https://dnitza.com" - channel.name "dnitza.com" - channel.lastBuildDate Time.now.rfc2822 - channel.pubDate Time.now.rfc2822 - channel.ttl 1800 +xml.rss do |rss| + rss.channel do |channel| + channel.title "Daniel Nitsikopoulos" + channel.description "The personal blog of Daniel Nitsikopoulos, software engineer from Canberra, ACT" + channel.link "https://dnitza.com" + channel.name "dnitza.com" + channel.lastBuildDate Time.now.rfc2822 + channel.pubDate Time.now.rfc2822 + channel.ttl 1800 - channel.alternate_feed do |item| - item.link "/feeds/rss" - item.title "Main feed (this feed)" - item.description "Containing longer text posts and bookmarks" - end + channel.alternate_feed do |item| + item.link "/feeds/rss" + item.title "Main feed (this feed)" + item.description "Containing longer text posts and bookmarks" + end - channel.alternate_feed do |item| - item.link "/feeds/statuses_rss" - item.title "Statuses / Microblog" - item.description "Only shorter posts and photo posts, usually also appearing on Mastodon" - end + channel.alternate_feed do |item| + item.link "/feeds/statuses_rss" + item.title "Statuses / Microblog" + item.description "Only shorter posts and photo posts, usually also appearing on Mastodon" + end - posts.each do |post| - channel.item do |item| - item.title post.display_title - item.description do |desc| - desc.cdata! post.feed_content + posts.each do |post| + channel.item do |item| + item.title post.display_title + item.description do |desc| + desc.cdata! post.feed_content + end + item.link(post.permalink) + item.guid(post.slug, isPermaLink: true) + item.pubDate post.machine_published_at end - item.link(post.permalink) - item.guid(post.slug, isPermaLink: true) - item.pubDate post.machine_published_at end end end diff --git a/slices/main/templates/feeds/statuses_rss.xml.builder b/slices/main/templates/feeds/statuses_rss.xml.builder index 505cb96..c994cf9 100644 --- a/slices/main/templates/feeds/statuses_rss.xml.builder +++ b/slices/main/templates/feeds/statuses_rss.xml.builder @@ -1,35 +1,37 @@ xml.instruct! "xml-stylesheet", {href: "/assets/style.xslt", type: "text/xsl"} -xml.channel do |channel| - channel.title "Daniel Nitsikopoulos" - channel.description "The personal blog of Daniel Nitsikopoulos, software engineer from Canberra, ACT" - channel.link "https://dnitza.com" - channel.name "dnitza.com" - channel.lastBuildDate Time.now.rfc2822 - channel.pubDate Time.now.rfc2822 - channel.ttl 1800 +xml.rss do |rss| + rss.channel do |channel| + channel.title "Daniel Nitsikopoulos" + channel.description "The personal blog of Daniel Nitsikopoulos, software engineer from Canberra, ACT" + channel.link "https://dnitza.com" + channel.name "dnitza.com" + channel.lastBuildDate Time.now.rfc2822 + channel.pubDate Time.now.rfc2822 + channel.ttl 1800 - channel.alternate_feed do |item| - item.link "/feeds/rss" - item.title "Main feed" - item.description "Containing longer text posts and bookmarks" - end + channel.alternate_feed do |item| + item.link "/feeds/rss" + item.title "Main feed" + item.description "Containing longer text posts and bookmarks" + end - channel.alternate_feed do |item| - item.link "/feeds/statuses_rss" - item.title "Statuses / Microblog (this feed)" - item.description "Only shorter posts and photo posts, usually also appearing on Mastodon" - end + channel.alternate_feed do |item| + item.link "/feeds/statuses_rss" + item.title "Statuses / Microblog (this feed)" + item.description "Only shorter posts and photo posts, usually also appearing on Mastodon" + end - posts.each do |post| - channel.item do |item| - item.title post.raw_content - item.description do |desc| - desc.cdata! post.feed_content + posts.each do |post| + channel.item do |item| + item.title post.raw_content + item.description do |desc| + desc.cdata! post.feed_content + end + item.link(post.permalink) + item.guid(post.slug, isPermaLink: true) + item.pubDate post.machine_published_at end - item.link(post.permalink) - item.guid(post.slug, isPermaLink: true) - item.pubDate post.machine_published_at end end end diff --git a/slices/micropub/decorators/posts/decorator.rb b/slices/micropub/decorators/posts/decorator.rb index c9bb39b..edb5e45 100644 --- a/slices/micropub/decorators/posts/decorator.rb +++ b/slices/micropub/decorators/posts/decorator.rb @@ -50,7 +50,11 @@ module Micropub def display_title title = name - "#{prefix_emoji} #{title}" + if prefix_emoji + return "#{prefix_emoji} #{title}" + else + return title + end end def display_published_at