Skip to content

Commit

Permalink
add feed support, place the hyperlink at footer
Browse files Browse the repository at this point in the history
  • Loading branch information
leafee98 committed May 13, 2022
1 parent dff69c5 commit b46d6da
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
14 changes: 12 additions & 2 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
@@ -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>
10 changes: 6 additions & 4 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
@@ -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 }}
Expand Down

0 comments on commit b46d6da

Please sign in to comment.