From 6b00ac4d91413ed0d50a988e9fdd976646a56f8f Mon Sep 17 00:00:00 2001 From: Vivek R Date: Sat, 20 Apr 2019 14:12:08 +0530 Subject: [PATCH] feat: add rss link to header --- exampleSite/config.toml | 5 +++++ layouts/partials/header.html | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index e8c5c5c..eeea110 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -49,5 +49,10 @@ name = "Twitter" icon = "twitter" url = "https://twitter.com/gohugoio" +[[params.social]] +name = "RSS" +icon = "rss" +url = "/index.xml" + [taxonomies] tag = "tags" diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 59bf2c9..c190cb0 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -10,6 +10,10 @@ {{- end -}} + {{ with .OutputFormats.Get "rss" -}} + {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} + {{ end -}} + {{- template "_internal/opengraph.html" . -}} {{- template "_internal/twitter_cards.html" . -}}