add feed support, place the hyperlink at footer

This commit is contained in:
leafee98 2022-05-13 20:12:07 +08:00
parent dff69c5bd3
commit b46d6da8ba
2 changed files with 18 additions and 6 deletions

View file

@ -1,13 +1,23 @@
<footer class="footer">
<div class="footer-row">
{{ if .IsHome }}
<a class="footer-item" href="/index.xml">The Site Feed</a>
{{ else }}
<a class="footer-item" href="/index.xml">The Site Feed</a>
{{ with .OutputFormats.Get "rss" }}
<a class="footer-item" href="{{ .Permalink }}">The Taxonomy Feed</a>
{{ end }}
{{ end }}
</div>
{{ range .Site.Params.footer_rows }}
<div class="footer-row">
{{ range .items }}
{{ with .pre }}
<span class="footer-item">{{ . | safeHTML }}</span>
{{ else }}
<a href="{{ .url }}">{{ .name }}</a>
<a class="footer-item" href="{{ .url }}">{{ .name }}</a>
{{ end }}
{{ end }}
</div>
{{ end }}
</footer>
</footer>

View file

@ -1,12 +1,14 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,minimum-scale=1">
{{ range .AlternativeOutputFormats -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}
{{/* load mermaid if any mermaid code block */}}
{{ if .Page.Store.Get "hasMermaid" }}
<script src="{{ "/js/meraid-9.0.0.min.js" | absURL }}"></script>
<script>
mermaid.initialize({ startOnLoad: true });
</script>
<script src="{{ "/js/meraid-9.0.0.min.js" | absURL }}"></script>
<script>mermaid.initialize({ startOnLoad: true });</script>
{{ end }}
{{ with .Site.Params.remark42 }}