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

github.com/Mitrichius/hugo-theme-anubis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Kolosov <mitrichius@gmail.com>2022-01-19 18:49:55 +0300
committerDmitry Kolosov <mitrichius@gmail.com>2022-01-19 18:49:55 +0300
commit47a0734cce7eb13c1b5779818670b582fe9ee53d (patch)
tree3b9088cebf4381bc491d02fc68edd5b82af0120f
parent05206ec0215fc0f004b5bd7bf225981aed655b3d (diff)
add rssAsSocialIcon param #128
-rw-r--r--README.md5
-rw-r--r--exampleSite/config.toml1
-rw-r--r--exampleSiteMultilingual/config.toml1
-rw-r--r--layouts/partials/fa-icons/rss.svg1
-rw-r--r--layouts/partials/social.html12
5 files changed, 19 insertions, 1 deletions
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 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!-- Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M128.081 415.959c0 35.369-28.672 64.041-64.041 64.041S0 451.328 0 415.959s28.672-64.041 64.041-64.041 64.04 28.673 64.04 64.041zm175.66 47.25c-8.354-154.6-132.185-278.587-286.95-286.95C7.656 175.765 0 183.105 0 192.253v48.069c0 8.415 6.49 15.472 14.887 16.018 111.832 7.284 201.473 96.702 208.772 208.772.547 8.397 7.604 14.887 16.018 14.887h48.069c9.149.001 16.489-7.655 15.995-16.79zm144.249.288C439.596 229.677 251.465 40.445 16.503 32.01 7.473 31.686 0 38.981 0 48.016v48.068c0 8.625 6.835 15.645 15.453 15.999 191.179 7.839 344.627 161.316 352.465 352.465.353 8.618 7.373 15.453 15.999 15.453h48.068c9.034-.001 16.329-7.474 16.005-16.504z"/></svg> \ 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 @@
</li>
{{ end }}
{{ end }}
-</ul>
+
+{{ if .Site.Params.rssAsSocialIcon }}
+ {{ $url := "/index.xml" | relLangURL }}
+ <li>
+ <a {{ printf "href=%q" $url | safeHTMLAttr }} title="RSS" rel="me">
+ {{ partial "font-awesome.html" (dict "iconName" "rss" "custom" false) }}
+ </a>
+ </li>
+{{ end }}
+
+</ul> \ No newline at end of file