diff options
| author | Eltrac <hi@guhub.cn> | 2025-05-09 09:09:20 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-05-09 09:09:20 +0800 |
| commit | ca3bce8d6d36017acbd4c3a513f24c46ed27f600 (patch) | |
| tree | 05c8d2bfb73f946283205a9924e648dce3441994 /layouts | |
| parent | 90e1777fe77f9e1c7552efd4ce3e18e384468f32 (diff) | |
feat: add author information
Diffstat (limited to 'layouts')
| -rw-r--r-- | layouts/partials/head/siteinfo.html | 12 | ||||
| -rw-r--r-- | layouts/partials/header.html | 2 |
2 files changed, 7 insertions, 7 deletions
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 --> |
