]> gitweb.mndrdr.org Git - arelpe.git/commitdiff
Sane defaults for podcast feed
authorAidan Cornelius-Bell <[email protected]>
Sat, 18 Jan 2025 03:19:24 +0000 (13:49 +1030)
committerAidan Cornelius-Bell <[email protected]>
Sat, 18 Jan 2025 03:19:24 +0000 (13:49 +1030)
app/views/audios/feed.rss.erb

index 79e4700451b53d7dc5ab852f7a79828ed4e7cb1f..9a72167ff6a21eee4c3233a63a8de1dce543d6cf 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <rss version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:content="http://purl.org/rss/1.0/modules/content/">
   <channel>
-    <title><%= Rails.application.config.site_name %> Podcast</title>
+    <title><%= Rails.application.config.site_name %> podcast</title>
     <link><%= root_url %></link>
     <language>en-us</language>
     <copyright>© <%= Time.current.year %> <%= Rails.application.config.site_name %></copyright>
             url="<%= rails_blob_url(audio.file) %>"
             length="<%= audio.file.byte_size %>"
             type="audio/mpeg"/>
-          <guid isPermaLink="false"><%= audio_url(audio) %></guid>
+          <guid isPermaLink="false"><%= if audio.post.present? then "https://mndrdr.org/#{audio.post.published_at.year}/#{audio.post.slug}" else audio_url(audio) end %></guid>
           <itunes:duration><%= audio.rss_duration %></itunes:duration>
-          <itunes:summary><![CDATA[<%= audio.description %>]]></itunes:summary>
+          <itunes:summary><![CDATA[<%= audio.description %>. <%= if audio.post.present? then "\nPre-written transcript:" + audio.post.rendered_content end %>]]></itunes:summary>
           <% if audio.post.present? %>
-            <link><%= post_url(audio.post) %></link>
+            <link><%= if audio.post.present? then "https://mndrdr.org/#{audio.post.published_at.year}/#{audio.post.slug}" else audio_url(audio) end %></link>
           <% end %>
         </item>
       <% end %>