From a33c9c810aeaf4b0658ab4b2e7ea69f2fbf35b46 Mon Sep 17 00:00:00 2001 From: Victor Freire Date: Wed, 17 Jul 2024 12:43:24 -0300 Subject: [PATCH] fix rss feed on hugo export closes #66 --- export_base_hugo/baseof.html | 4 +++- export_base_hugo/config.toml | 5 +++++ export_base_hugo/index.html | 8 ++++++-- export_base_hugo/single.html | 9 ++++++++- 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/export_base_hugo/baseof.html b/export_base_hugo/baseof.html index 497cb098..a9e52698 100644 --- a/export_base_hugo/baseof.html +++ b/export_base_hugo/baseof.html @@ -13,7 +13,9 @@ {{- end }} - + {{ with .OutputFormats.Get "rss" -}} + {{ printf `` .Rel .MediaType.Type .Permalink site.Title | safeHTML }} + {{ end }} diff --git a/export_base_hugo/config.toml b/export_base_hugo/config.toml index 1af7528f..b18dec41 100644 --- a/export_base_hugo/config.toml +++ b/export_base_hugo/config.toml @@ -5,3 +5,8 @@ theme = "mataroa" [params] description = "Example blog description" + +[outputFormats] + [outputFormats.RSS] + mediatype = "application/rss" + baseName = "rss" \ No newline at end of file diff --git a/export_base_hugo/index.html b/export_base_hugo/index.html index cd517673..6d81d311 100644 --- a/export_base_hugo/index.html +++ b/export_base_hugo/index.html @@ -23,7 +23,11 @@

{{ .Site.Title }}

{{ end }} diff --git a/export_base_hugo/single.html b/export_base_hugo/single.html index 2ed1bcdd..3e39e99c 100644 --- a/export_base_hugo/single.html +++ b/export_base_hugo/single.html @@ -20,6 +20,13 @@

{{ end }}