From 5c25205f944c69b9c8d9e415f889a87bec36559f Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 4 Jan 2021 15:30:33 +0100 Subject: [PATCH 1/3] themes: add Atom Feed component submodule --- .gitmodules | 3 +++ themes/hugo-atom-feed | 1 + 2 files changed, 4 insertions(+) create mode 160000 themes/hugo-atom-feed diff --git a/.gitmodules b/.gitmodules index 5a69223..0e131a2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "themes/anubis"] path = themes/anubis url = https://github.com/mitrichius/hugo-theme-anubis.git +[submodule "themes/hugo-atom-feed"] + path = themes/hugo-atom-feed + url = https://github.com/kaushalmodi/hugo-atom-feed.git diff --git a/themes/hugo-atom-feed b/themes/hugo-atom-feed new file mode 160000 index 0000000..5da913d --- /dev/null +++ b/themes/hugo-atom-feed @@ -0,0 +1 @@ +Subproject commit 5da913dc46d2dadcaf6548256238c58c504476de From 3fb0cb9f8c18728f4495e85d819931c265534908 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 4 Jan 2021 15:34:41 +0100 Subject: [PATCH 2/3] config: add Atom Feed component configuration --- config.yaml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/config.yaml b/config.yaml index abd5e0d..a1d5065 100644 --- a/config.yaml +++ b/config.yaml @@ -2,7 +2,9 @@ baseURL: "https://belanyi.fr/" languageCode: "en-us" title: "Ambroisie's blog" -theme: "anubis" +theme: + - "hugo-atom-feed" + - "anubis" paginate: 5 disqusShortname: "" googleAnalytics: "" @@ -39,6 +41,16 @@ author: permalinks: posts: /:year/:month/:day/:title/ +outputs: + # /atom.xml + home: [ "HTML", "RSS", "ATOM" ] + # /posts/atom.xml + section: [ "HTML", "RSS", "ATOM" ] + # /tags/mytag/atom.xml + taxonomy: [ "HTML", "RSS", "ATOM" ] + +ignoreErrors: + - "error-output-taxonomy" params: author: "Bruno BELANYI" From 2f8b439582eb87a73712635f5900b8ea1dd2a7e3 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 4 Jan 2021 15:49:02 +0100 Subject: [PATCH 3/3] layouts: partials: add link to Atom Feed in header --- layouts/partials/head-extra.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/layouts/partials/head-extra.html b/layouts/partials/head-extra.html index 2709217..1e65c9f 100644 --- a/layouts/partials/head-extra.html +++ b/layouts/partials/head-extra.html @@ -3,3 +3,6 @@ {{ end }} +{{ with .OutputFormats.Get "atom" -}} + {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} +{{ end -}}