aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Fallenstedt <a.fallenstedt@gmail.com>2021-12-30 19:10:33 -0800
committerGitHub <noreply@github.com>2021-12-30 21:10:33 -0600
commita8ae2c5743f105b715bb9496e7659d599dbb75ba (patch)
tree82b78a574666ac26ca663ee346dae5fa36985d88
parent6d4b5dcfbfebb7d5b800c8010e623ca95026a70c (diff)
downloadzk-theme-a8ae2c5743f105b715bb9496e7659d599dbb75ba.tar.gz
zk-theme-a8ae2c5743f105b715bb9496e7659d599dbb75ba.zip
display current year in footer (#54)
-rw-r--r--exampleSite/config.yaml2
-rw-r--r--layouts/partials/footer.html2
2 files changed, 2 insertions, 2 deletions
diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml
index 6571937..59b9ae1 100644
--- a/exampleSite/config.yaml
+++ b/exampleSite/config.yaml
@@ -30,7 +30,7 @@ menu:
params:
description: "A website built through Hugo and blogdown."
- footer: "&copy; [Yihui Xie](https://yihui.org) 2017 -- 2021 | [Github](https://github.com/yihui) | [Twitter](https://twitter.com/xieyihui)"
+ footer: "&copy; [Yihui Xie](https://yihui.org) 2017 -- {Year} | [Github](https://github.com/yihui) | [Twitter](https://twitter.com/xieyihui)"
markup:
highlight:
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 3f46ea5..f603e17 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -2,7 +2,7 @@
{{ partial "foot_custom.html" . }}
{{ with .Site.Params.footer }}
<hr/>
- {{ . | markdownify }}
+ {{ replace . "{Year}" now.Year | markdownify}}
{{ end }}
</footer>
</body>