From: Aidan Cornelius-Bell Date: Sun, 15 Sep 2024 01:54:40 +0000 (+0930) Subject: Fixed rss canonical url X-Git-Url: https://gitweb.mndrdr.org/?a=commitdiff_plain;h=d0f64e848a5639c67ad4ecefc40577b3220999ae;p=arelpe.git Fixed rss canonical url --- diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index b441a45..ed63592 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -18,8 +18,8 @@ <%= stylesheet_link_tag "application" %> - <%= auto_discovery_link_tag(:rss, rss_url, title: "mind reader (bookmarks and dispatch excerpts)") %> - <%= auto_discovery_link_tag(:rss, dispatches_rss_url, title: "mind reader (full dispatches)") %> + <%= auto_discovery_link_tag(:rss, rss_url, title: "mind reader :: dispatches and bookmarks in summary") %> + <%= auto_discovery_link_tag(:rss, dispatches_rss_url, title: "mind reader :: dispatches full text") %> <% if ['posts', 'pages'].include?(controller.controller_name) %> diff --git a/app/views/pubview/rss.rss.builder b/app/views/pubview/rss.rss.builder index 6e90f58..c8093a3 100644 --- a/app/views/pubview/rss.rss.builder +++ b/app/views/pubview/rss.rss.builder @@ -5,7 +5,7 @@ if params[:action] == 'dispatches_rss' xml.title "mind reader :: dispatches full text" xml.description "Posts in full from Aidan’s anti-capitalist posting and sharing project" else - xml.title "mind reader :: dispatches and bookmarks summary" + xml.title "mind reader :: dispatches and bookmarks in summary" xml.description "Posts and links in summary from Aidan’s anti-capitalist posting and sharing project" end xml.link root_url @@ -23,7 +23,11 @@ xml.language "en-US" xml.description post.generate_excerpt end xml.pubDate post.rss_time + if post.post_type == 'bookmark' + xml.link post.url + else xml.link public_post_url(year: post.created_at.year, slug: post.slug) + end xml.guid public_post_url(year: post.created_at.year, slug: post.slug) # Add more metadata if needed