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

github.com/budparr/gohugo-theme-ananke.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiamon <diamonster@users.noreply.github.com>2021-10-01 20:11:40 +0300
committerGitHub <noreply@github.com>2021-10-01 20:11:40 +0300
commit597a631988526380e81061f778f85eff43653a5d (patch)
tree330deb36dcbd8e6ca9a1712ba02c054fcfe70986
parente3f7fbe39d7b24d43e80a3c95aa3d940731ac535 (diff)
add default author (#408)
-rw-r--r--exampleSite/config.toml3
-rwxr-xr-xlayouts/_default/single.html2
2 files changed, 3 insertions, 2 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 9d6a04b..be77ee4 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -27,6 +27,7 @@ enableRobotsTXT = true
filename = "sitemap.xml"
[params]
+ author = ""
favicon = ""
site_logo = ""
description = "The last theme you'll ever need. Maybe."
@@ -44,4 +45,4 @@ enableRobotsTXT = true
# choose a background color from any on this page: http://tachyons.io/docs/themes/skins/ and preface it with "bg-"
background_color_class = "bg-black"
featured_image = "/images/gohugo-default-sample-hero-image.jpg"
- recent_posts_number = 2 \ No newline at end of file
+ recent_posts_number = 2
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index cbb7e74..7cf01e2 100755
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -18,7 +18,7 @@
<h1 class="f1 athelas mt3 mb1">
{{- .Title -}}
</h1>
- {{ with .Params.author }}
+ {{ with .Params.author | default .Site.Params.author }}
<p class="tracked">
By <strong>
{{ if reflect.IsSlice . }}