feat: add support for Terms in footer (#1236)

To use, copy `themes/academic/exampleSite/content/terms.md` to `content/terms.md` in your site, add your legal terms, and remove the `draft` option to publish.
This commit is contained in:
Julian Pawlowski authored and George committed 2019-07-27 20:51:18 +01:00
1 parent 0fe72a339c
commit 8272c2c8fb
2 files changed
+21 -2

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
---
title: Terms
date: "2018-06-28T00:00:00+01:00"
draft: true
share: false
# Optional header image (relative to `static/img/` folder).
header:
caption: ""
image: ""
---
...
+8 -2
View File
@@ -1,7 +1,13 @@
<footer class="site-footer">
{{ with site.GetPage "privacy.md" }}
{{ if or (site.GetPage "terms.md") (site.GetPage "privacy.md") }}
<p class="powered-by">
{{ printf "<a href=\"%s\">%s</a>" .RelPermalink .Title | safeHTML }}
{{ with site.GetPage "privacy.md" }}
{{ printf "<a href=\"%s\">%s</a>" .RelPermalink .Title | safeHTML }}
{{ end }}
{{ with site.GetPage "terms.md" }}
{{ if site.GetPage "privacy.md" }} &middot; {{ end }}
{{ printf "<a href=\"%s\">%s</a>" .RelPermalink .Title | safeHTML }}
{{ end }}
</p>
{{ end }}