Optional feedlinks in footer.

This commit is contained in:
Fredrik Jonsson 2017-05-19 14:34:28 +02:00
commit 43abc37088
2 changed files with 31 additions and 13 deletions

View file

@ -22,7 +22,8 @@
</div>
<footer class="footer" role="contentinfo">
<p>{{ with $.Param "copyright" }}{{ . | markdownify }}{{ else }}<span>&copy; {{ .Site.Title }}</span>{{ end }}</p>
{{ if $.Param "feedlinks" }}{{ partial "feedlinks.html" . -}}{{ end }}
<p>{{ with $.Param "copyright" }}{{ . | markdownify }}{{ else }}<span>© {{ .Site.Title }}</span>{{ end }}</p>
{{ with $.Param "footer" }}<p>{{ . | markdownify }}</p>{{ end -}}
{{ if $.Param "poweredby" }}<p>Powered by <a href="https://gohugo.io/">Hugo</a></p>{{ end -}}
</footer>

View file

@ -0,0 +1,6 @@
{{ $list := .AlternativeOutputFormats -}}
{{ $length := (len $list) -}}
<p>Subscribe{{ with .Section }} to section {{ . }}{{ end }}: {{ range $index, $element := $list -}}
<a href="{{ .Permalink | safeURL }}">{{ .Name }}</a>{{ if ne (add $index 1) $length }} | {{ end }}
{{- end -}}
</p>