diff options
author | diamon <diamonster@users.noreply.github.com> | 2021-10-01 20:11:40 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-01 20:11:40 +0300 |
commit | 597a631988526380e81061f778f85eff43653a5d (patch) | |
tree | 330deb36dcbd8e6ca9a1712ba02c054fcfe70986 | |
parent | e3f7fbe39d7b24d43e80a3c95aa3d940731ac535 (diff) |
add default author (#408)
-rw-r--r-- | exampleSite/config.toml | 3 | ||||
-rwxr-xr-x | layouts/_default/single.html | 2 |
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 . }} |