Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/EmielH/tale-hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmiel Hollander <EmielH@users.noreply.github.com>2018-10-28 21:27:00 +0300
committerEmiel Hollander <EmielH@users.noreply.github.com>2018-10-28 21:27:00 +0300
commita4040547736578f6baf05b41b6a5ecd52ff2f77b (patch)
tree49aaf3d3f199791c0b00e0e3c3c0c57460a97f15
parentc9604bb1e372fdce9c9c4082ca59ae45254c649e (diff)
Use .Site.Author.name in footer instead of .Site.Params.Author
Hugo provides an Author site variable that can be set in the site configuration. Instead of setting the author variable in the params, section from this commit on, you have to use the name variable in the Author section. This adheres more to Hugo standards. See README.MD for an example.
-rw-r--r--README.md9
-rw-r--r--layouts/partials/footer.html2
2 files changed, 10 insertions, 1 deletions
diff --git a/README.md b/README.md
index ac7744a..fb5abbf 100644
--- a/README.md
+++ b/README.md
@@ -85,6 +85,15 @@ These are included in the template for a single post, at the top of the post (be
This partial is included at the top of the list of posts on the index page, allowing you to add an introduction to your site.
+### Copyright message
+
+The copyright message in the footer uses the name of the author of the site, as defined in `config.toml`. For example:
+
+```
+[Author]
+ name = "Emiel"
+```
+
## Acknowledgments
Thanks
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 2cb6826..3fdfa4f 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -1,5 +1,5 @@
<footer>
<span>
- &copy; <time datetime="{{ now }}">{{ now.Format "2006" }}</time> {{ .Site.Params.Author }}. {{ i18n "generator" | safeHTML }}
+ &copy; <time datetime="{{ now }}">{{ now.Format "2006" }}</time> {{ .Site.Author.name }}. {{ i18n "generator" | safeHTML }}
</span>
</footer>