From 6d4f5f28c99e2f6587320089ca75b4bbd4684112 Mon Sep 17 00:00:00 2001 From: Roan Horning Date: Wed, 17 Aug 2022 22:32:32 -0400 Subject: [PATCH] Refactor main feed to need fewer templates Add configuration properties to minimize the number of templates needed to generate the different audio format feeds. --- site.cfg | 11 ++++++++--- templates/{rss-hpr_mp3.tpl.xml => rss-hpr.tpl.xml} | 2 +- templates/rss-hpr_ogg.tpl.xml | 5 ----- templates/rss-hpr_spx.tpl.xml | 5 ----- 4 files changed, 9 insertions(+), 14 deletions(-) rename templates/{rss-hpr_mp3.tpl.xml => rss-hpr.tpl.xml} (66%) delete mode 100644 templates/rss-hpr_ogg.tpl.xml delete mode 100644 templates/rss-hpr_spx.tpl.xml diff --git a/site.cfg b/site.cfg index 4100890..afa90c4 100644 --- a/site.cfg +++ b/site.cfg @@ -134,15 +134,20 @@ content: content-sitemap.tpl.html [hpr_ogg] root_template: rss.tpl.xml -content: rss-hpr_ogg.tpl.xml +content: rss-hpr.tpl.xml filename: hpr_ogg.rss +media_file_extension: ogg [hpr_mp3] root_template: rss.tpl.xml -content: rss-hpr_mp3.tpl.xml +content: rss-hpr.tpl.xml filename: hpr_mp3.rss +media_file_extension: mp3 +audio_mime_type: mpeg [hpr_spx] root_template: rss.tpl.xml -content: rss-hpr_spx.tpl.xml +content: rss-hpr.tpl.xml filename: hpr_spx.rss +media_file_extension: spx + diff --git a/templates/rss-hpr_mp3.tpl.xml b/templates/rss-hpr.tpl.xml similarity index 66% rename from templates/rss-hpr_mp3.tpl.xml rename to templates/rss-hpr.tpl.xml index 174c76e..b07e0bb 100644 --- a/templates/rss-hpr_mp3.tpl.xml +++ b/templates/rss-hpr.tpl.xml @@ -1,5 +1,5 @@ - + diff --git a/templates/rss-hpr_ogg.tpl.xml b/templates/rss-hpr_ogg.tpl.xml deleted file mode 100644 index 3b012a8..0000000 --- a/templates/rss-hpr_ogg.tpl.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/templates/rss-hpr_spx.tpl.xml b/templates/rss-hpr_spx.tpl.xml deleted file mode 100644 index eb08122..0000000 --- a/templates/rss-hpr_spx.tpl.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - -