diff options
| -rw-r--r-- | hugo.yaml | 1 | ||||
| -rw-r--r-- | layouts/partials/head/siteinfo.html | 12 | ||||
| -rw-r--r-- | layouts/partials/header.html | 2 |
3 files changed, 8 insertions, 7 deletions
@@ -82,6 +82,7 @@ markup: tabWidth: 2 params: + author: Eltrac mainSections: - posts - fictions diff --git a/layouts/partials/head/siteinfo.html b/layouts/partials/head/siteinfo.html index 64c14506..ff029ac1 100644 --- a/layouts/partials/head/siteinfo.html +++ b/layouts/partials/head/siteinfo.html @@ -7,7 +7,7 @@ <title>{{ $title }}</title> <link rel="canonical" href="{{ .Permalink }}" /> -<meta name="author" content="{{ .Site.Author.name }}" /> +<meta name="author" content="{{ .Params.author | default .Site.Params.author }}" /> <meta property="og:url" content="{{ .Permalink }}" /> <meta property="og:title" content="{{ $title }}" /> <meta property="og:type" content="{{ $ogType }}" /> @@ -39,11 +39,11 @@ "description" : "{{ default .Summary .Description | plainify }}", {{- end }} "inLanguage" : "zh-CN", - "author" : "{{ .Site.Author.name }}", - "creator" : "{{ .Site.Author.name }}", - "publisher": "{{ .Site.Author.name }}", - "accountablePerson" : "{{ .Site.Author.name }}", - "copyrightHolder" : "{{ .Site.Author.name }}", + "author" : "{{ .Params.author | default .Site.Params.author }}", + "creator" : "{{ .Params.author | default .Site.Params.author }}", + "publisher": "{{ .Params.author | default .Site.Params.author }}", + "accountablePerson" : "{{ .Params.author | default .Site.Params.author }}", + "copyrightHolder" : "{{ .Params.author | default .Site.Params.author }}", "copyrightYear" : "{{ .Date.Format "2006" }}", "datePublished": "{{ .Date }}", "dateModified" : "{{ .Date }}", diff --git a/layouts/partials/header.html b/layouts/partials/header.html index bf2716dd..9f6d4f78 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -6,7 +6,7 @@ style="view-transition-name: title-image" /> <a class="title-link" href="{{ .Site.LanguagePrefix }}/" - >{{ or .Site.Params.headTitle .Site.Author.name }}</a + >{{ .Site.Params.headTitle }}</a > </div> <!-- Navigation --> |
