diff --git a/archetypes/blog/index.md b/archetypes/blog/index.md index 65fc64f..2a2c56e 100644 --- a/archetypes/blog/index.md +++ b/archetypes/blog/index.md @@ -2,6 +2,7 @@ title: {{ replace .Name "-" " " | title }} date: {{ .Date | time.Format "2006-01-02" }} +author: {{ with .Site.Author.name }}{{ . }}{{ else }}John Doe{{ end }} toc: true comments: true draft: true diff --git a/archetypes/default/index.md b/archetypes/default/index.md index 9bd7542..1de9acb 100644 --- a/archetypes/default/index.md +++ b/archetypes/default/index.md @@ -1,6 +1,7 @@ --- title: {{ replace .Name "-" " " | title }} +author: {{ with .Site.Author.name }}{{ . }}{{ else }}John Doe{{ end }} menu: main toc: true comments: false diff --git a/exampleSite/config.toml b/exampleSite/config.toml index ba2abac..b0cbdb2 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -1,12 +1,15 @@ baseURL = "https://example.com" theme = "bobatheme" defaultContentLanguage = "en" -author = "bbaovanc" +copyright = '© 2021 bbaovanc CC BY-SA 4.0' sectionPagesMenu = "main" enableRobotsTXT = true paginate = 5 enableGitInfo = true +[author] + name = "bbaovanc" + [markup] [markup.highlight] noClasses = false diff --git a/layouts/partials/post-metadata.html b/layouts/partials/post-metadata.html index b63abe8..2f4f11d 100644 --- a/layouts/partials/post-metadata.html +++ b/layouts/partials/post-metadata.html @@ -20,6 +20,13 @@ {{ end }} {{ end }} + {{ with .Params.author }} + + {{ partial "icon.html" "user" }} + {{ . }} + + {{ end }} + {{ if .IsTranslated }} {{ partial "icon.html" "globe" }}