Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/vividvilla/ezhil.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVivek R <vividvilla@gmail.com>2019-04-20 11:42:08 +0300
committerVivek R <vividvilla@gmail.com>2019-04-20 11:42:08 +0300
commit6b00ac4d91413ed0d50a988e9fdd976646a56f8f (patch)
tree3c2a57c6f404b47a533e684ab1bbd29fd703476c
parent7d249c573faec701e7368fcf3bfe0c531af70fc8 (diff)
feat: add rss link to header
-rw-r--r--exampleSite/config.toml5
-rw-r--r--layouts/partials/header.html4
2 files changed, 9 insertions, 0 deletions
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 -}}
<meta name="viewport" content="width=device-width, initial-scale=1">
+ {{ with .OutputFormats.Get "rss" -}}
+ {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
+ {{ end -}}
+
{{- template "_internal/opengraph.html" . -}}
{{- template "_internal/twitter_cards.html" . -}}
<link href="https://fonts.googleapis.com/css?family=Ubuntu:300,400,300italic,400italic|Raleway:500,100,300" rel="stylesheet">