summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorleafee98 <leafee98@hotmail.com>2022-05-13 20:12:07 +0800
committerleafee98 <leafee98@hotmail.com>2022-05-13 20:12:07 +0800
commitb46d6da8ba21f6e043438f4ca5ad72d38bb0d009 (patch)
tree4e3d4e3607f94e09014f5725b42e763fcd08fe98
parentdff69c5bd312f40ba46098526f709f4058e33857 (diff)
add feed support, place the hyperlink at footer
-rw-r--r--layouts/partials/footer.html14
-rw-r--r--layouts/partials/head.html10
2 files changed, 18 insertions, 6 deletions
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index bd9fdce..aeb8d16 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -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> \ No newline at end of file
+</footer>
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 74f207e..fd0d8e9 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -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 }}