add rssAsSocialIcon param #128

This commit is contained in:
Dmitry Kolosov 2022-01-19 18:49:55 +03:00
parent 05206ec021
commit 47a0734cce
5 changed files with 19 additions and 1 deletions

View File

@ -84,6 +84,7 @@ params:
readMore: false readMore: false
disableSummary: false disableSummary: false
copyCodeButton: true # true by default copyCodeButton: true # true by default
rssAsSocialIcon: true
# utteranc.es support # utteranc.es support
utterancesRepo: "" # mandatory utterancesRepo: "" # mandatory
utterancesTheme: "" # optional utterancesTheme: "" # optional
@ -203,6 +204,10 @@ Only works for production environment.
### Multilingual mode ### 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/). 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 ### Robots.txt
Based on environment. Based on environment.
For production — allow all, for other — disallow all. For production — allow all, for other — disallow all.

View File

@ -18,6 +18,7 @@ paginationSinglePost = true
style = "auto" style = "auto"
readMore = false readMore = false
copyCodeButton = true copyCodeButton = true
rssAsSocialIcon = true
# utteranc.es support # utteranc.es support
utterancesRepo = "" # mandatory utterancesRepo = "" # mandatory

View File

@ -19,6 +19,7 @@ paginationSinglePost = true
style = "auto" style = "auto"
readMore = false readMore = false
copyCodeButton = true copyCodeButton = true
rssAsSocialIcon = true
# utteranc.es support # utteranc.es support
utterancesRepo = "" # mandatory utterancesRepo = "" # mandatory

View File

@ -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>

After

Width:  |  Height:  |  Size: 903 B

View File

@ -23,4 +23,14 @@
</li> </li>
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ 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> </ul>