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

github.com/gevhaz/hugo-theme-notrack.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon <gevhaz@tutanota.com>2022-07-27 23:03:30 +0300
committerSimon Bengtsson <62712116+gevhaz@users.noreply.github.com>2022-07-27 23:19:26 +0300
commit4829a52ad085b7ed407d4be008363a79a64e4739 (patch)
treeca113662701de291c955ac2b4e750d306923203a
parente9abfcb4d7a5ff3a83b7593929ef5d62ad093927 (diff)
Fix RSS icon not showing up in contact box
"Social" links did not show up in the contact box for sources that had neither "prefix" nor "template" specified in social.yaml. That is the case for more or less only RSS. This case is now handled in the shortcode.
-rw-r--r--data/notrack/social.yaml1
-rw-r--r--layouts/shortcodes/contact-box.html2
-rw-r--r--layouts/shortcodes/social.html2
3 files changed, 4 insertions, 1 deletions
diff --git a/data/notrack/social.yaml b/data/notrack/social.yaml
index 67a694b..36ceaf8 100644
--- a/data/notrack/social.yaml
+++ b/data/notrack/social.yaml
@@ -506,6 +506,5 @@ rss:
weight: 64
url: /index.xml
title: RSS
- newtab: true
icon:
class: fas fa-rss fa-fw
diff --git a/layouts/shortcodes/contact-box.html b/layouts/shortcodes/contact-box.html
index 4e84b0b..ddf5943 100644
--- a/layouts/shortcodes/contact-box.html
+++ b/layouts/shortcodes/contact-box.html
@@ -17,6 +17,8 @@
<li><a href="{{- .prefix -}}{{ .user }}"><i class="{{- .icon.class -}}"></i>{{ .title }}</a></li>
{{- else if .template -}}
<li><a href="{{- printf .template .user -}}"><i class="{{- .icon.class -}}"></i>{{ .title }}</a></li>
+ {{- else if .url -}}
+ <li><a href="{{- .url -}}"><i class="{{- .icon.class -}}"></i>{{ .title }}</a></li>
{{- end -}}
{{- end -}}
</ul>
diff --git a/layouts/shortcodes/social.html b/layouts/shortcodes/social.html
index fef88ec..51e0329 100644
--- a/layouts/shortcodes/social.html
+++ b/layouts/shortcodes/social.html
@@ -17,6 +17,8 @@
<li><a href="{{- .prefix -}}{{ .user }}"><i class="{{- .icon.class -}}"></i>{{ .title }}</a></li>
{{- else if .template -}}
<li><a href="{{- printf .template .user -}}"><i class="{{- .icon.class -}}"></i>{{ .title }}</a></li>
+ {{- else if .url -}}
+ <li><a href="{{- .url -}}"><i class="{{- .icon.class -}}"></i>{{ .title }}</a></li>
{{- end -}}
{{- end -}}
</ul>