From 47a0734cce7eb13c1b5779818670b582fe9ee53d Mon Sep 17 00:00:00 2001 From: Dmitry Kolosov Date: Wed, 19 Jan 2022 18:49:55 +0300 Subject: [PATCH] add rssAsSocialIcon param #128 --- README.md | 5 +++++ exampleSite/config.toml | 1 + exampleSiteMultilingual/config.toml | 1 + layouts/partials/fa-icons/rss.svg | 1 + layouts/partials/social.html | 12 +++++++++++- 5 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 layouts/partials/fa-icons/rss.svg diff --git a/README.md b/README.md index 8541a0d..1a71b8f 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,7 @@ params: readMore: false disableSummary: false copyCodeButton: true # true by default + rssAsSocialIcon: true # utteranc.es support utterancesRepo: "" # mandatory utterancesTheme: "" # optional @@ -203,6 +204,10 @@ Only works for production environment. ### Multilingual mode Check config/example usage in [exampleSiteMultilingual](https://github.com/Mitrichius/hugo-theme-anubis/tree/master/exampleSiteMultilingual) directory and documentation on [Hugo site](https://gohugo.io/content-management/multilingual/). +### RSS +RSS is available by site url + /index.xml. Also available for specific language, section, taxonomy. +`rssAsSocialIcon` parameter enables rss sosial icon with link to site current language RSS. + ### Robots.txt Based on environment. For production — allow all, for other — disallow all. diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 10499ad..073f1dc 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -18,6 +18,7 @@ paginationSinglePost = true style = "auto" readMore = false copyCodeButton = true +rssAsSocialIcon = true # utteranc.es support utterancesRepo = "" # mandatory diff --git a/exampleSiteMultilingual/config.toml b/exampleSiteMultilingual/config.toml index f20c615..e4e88e7 100644 --- a/exampleSiteMultilingual/config.toml +++ b/exampleSiteMultilingual/config.toml @@ -19,6 +19,7 @@ paginationSinglePost = true style = "auto" readMore = false copyCodeButton = true +rssAsSocialIcon = true # utteranc.es support utterancesRepo = "" # mandatory diff --git a/layouts/partials/fa-icons/rss.svg b/layouts/partials/fa-icons/rss.svg new file mode 100644 index 0000000..606aa89 --- /dev/null +++ b/layouts/partials/fa-icons/rss.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/layouts/partials/social.html b/layouts/partials/social.html index 10e266e..15b56b3 100644 --- a/layouts/partials/social.html +++ b/layouts/partials/social.html @@ -23,4 +23,14 @@ {{ end }} {{ end }} - + +{{ if .Site.Params.rssAsSocialIcon }} + {{ $url := "/index.xml" | relLangURL }} +
  • + + {{ partial "font-awesome.html" (dict "iconName" "rss" "custom" false) }} + +
  • +{{ end }} + + \ No newline at end of file