From b9539e9d691d07de7fbb29cd4a0479b8613f50d3 Mon Sep 17 00:00:00 2001 From: Cell <1024@lruihao.cn> Date: Wed, 27 Dec 2023 17:42:40 +0800 Subject: [PATCH] :pencil: Style: modify web page title separator symbol --- archetypes/offline.md | 2 +- layouts/404.html | 2 +- layouts/_default/section.html | 2 +- layouts/_default/single.html | 2 +- layouts/friends/single.html | 2 +- layouts/offline/single.html | 2 +- layouts/page/friends.html | 2 +- layouts/page/offline.html | 2 +- layouts/posts/rss.xml | 2 +- layouts/posts/single.html | 2 +- layouts/taxonomy/list.html | 2 +- layouts/taxonomy/rss.xml | 4 ++-- layouts/taxonomy/terms.html | 2 +- 13 files changed, 14 insertions(+), 14 deletions(-) diff --git a/archetypes/offline.md b/archetypes/offline.md index 37e409ae..73fd738c 100644 --- a/archetypes/offline.md +++ b/archetypes/offline.md @@ -1,6 +1,6 @@ --- layout: offline -description: '{{ T "offlineTitle" }} - {{ .Site.Title }}' +description: '{{ T "offlineTitle" }} | {{ .Site.Title }}' keywords: - PWA - {{ T "offlineTitle" }} diff --git a/layouts/404.html b/layouts/404.html index 5cf4efea..19cbe648 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -1,5 +1,5 @@ {{- define "title" -}} - {{- T "pageNotFound" | printf "404 %v" }} - {{ .Site.Title -}} + {{- T "pageNotFound" | printf "404 %v" }} | {{ .Site.Title -}} {{- end -}} {{- define "content" -}} diff --git a/layouts/_default/section.html b/layouts/_default/section.html index c69e699d..41bfc4cf 100644 --- a/layouts/_default/section.html +++ b/layouts/_default/section.html @@ -1,5 +1,5 @@ {{- define "title" }} - {{- .Params.Title | default (T .Section) | default .Section | dict "Some" | T "allSome" }} - {{ .Site.Title -}} + {{- .Params.Title | default (T .Section) | default .Section | dict "Some" | T "allSome" }} | {{ .Site.Title -}} {{- end -}} {{- define "content" -}} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 06582682..0fbf128b 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,4 +1,4 @@ -{{- define "title" }}{{ .Title }} - {{ .Site.Title }}{{ end -}} +{{- define "title" }}{{ .Title }} | {{ .Site.Title }}{{ end -}} {{- define "content" -}} {{- $params := .Scratch.Get "params" -}} diff --git a/layouts/friends/single.html b/layouts/friends/single.html index d706edc2..7befad89 100644 --- a/layouts/friends/single.html +++ b/layouts/friends/single.html @@ -1,7 +1,7 @@ {{- /* TODO remove this template */ -}} {{- warnf "The `type:friends` in front matter is deprecated. Use `layout:friends` instead.\n" -}} {{- warnf "Front matter 参数 `type:friends` 已弃用。请改用 `layout:friends`。" -}} -{{- define "title" }}{{ .Title }} - {{ .Site.Title }}{{ end -}} +{{- define "title" }}{{ .Title }} | {{ .Site.Title }}{{ end -}} {{- define "content" -}} {{- $params := .Scratch.Get "params" -}} diff --git a/layouts/offline/single.html b/layouts/offline/single.html index f3337f8d..8f7dc3e4 100644 --- a/layouts/offline/single.html +++ b/layouts/offline/single.html @@ -2,7 +2,7 @@ {{- warnf "The `type:offline` in front matter is deprecated. Use `layout:offline` instead.\n" -}} {{- warnf "Front matter 参数 `type:offline` 已弃用。请改用 `layout:offline`。" -}} {{- define "title" -}} - {{- T "offlineTitle" }} - {{ .Site.Title -}} + {{- T "offlineTitle" }} | {{ .Site.Title -}} {{- end -}} {{- define "content" -}} diff --git a/layouts/page/friends.html b/layouts/page/friends.html index ebb71bbb..0b15481e 100644 --- a/layouts/page/friends.html +++ b/layouts/page/friends.html @@ -1,4 +1,4 @@ -{{- define "title" }}{{ .Title }} - {{ .Site.Title }}{{ end -}} +{{- define "title" }}{{ .Title }} | {{ .Site.Title }}{{ end -}} {{- define "content" -}} {{- $params := .Scratch.Get "params" -}} diff --git a/layouts/page/offline.html b/layouts/page/offline.html index 758071fe..0c46594f 100644 --- a/layouts/page/offline.html +++ b/layouts/page/offline.html @@ -1,5 +1,5 @@ {{- define "title" -}} - {{- T "offlineTitle" }} - {{ .Site.Title -}} + {{- T "offlineTitle" }} | {{ .Site.Title -}} {{- end -}} {{- define "content" -}} diff --git a/layouts/posts/rss.xml b/layouts/posts/rss.xml index 7d7f76d4..c3183aa7 100644 --- a/layouts/posts/rss.xml +++ b/layouts/posts/rss.xml @@ -1,7 +1,7 @@ - {{- .Params.Title | default (T .Section) | default .Section | dict "Some" | T "allSome" }} - {{ .Site.Title -}} + {{- .Params.Title | default (T .Section) | default .Section | dict "Some" | T "allSome" }} | {{ .Site.Title -}} {{- .Permalink -}} diff --git a/layouts/posts/single.html b/layouts/posts/single.html index 1c717c51..6b25964c 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -1,4 +1,4 @@ -{{- define "title" }}{{ .Title }} - {{ .Site.Title }}{{ end -}} +{{- define "title" }}{{ .Title }} | {{ .Site.Title }}{{ end -}} {{- define "content" -}} {{- $params := .Scratch.Get "params" -}} diff --git a/layouts/taxonomy/list.html b/layouts/taxonomy/list.html index fbc45289..ef0f8135 100644 --- a/layouts/taxonomy/list.html +++ b/layouts/taxonomy/list.html @@ -1,5 +1,5 @@ {{- define "title" -}} - {{- .Title }} - {{ T .Data.Singular | default .Data.Singular }} - {{ .Site.Title -}} + {{- .Title }} - {{ T .Data.Singular | default .Data.Singular }} | {{ .Site.Title -}} {{- end -}} {{- define "content" -}} diff --git a/layouts/taxonomy/rss.xml b/layouts/taxonomy/rss.xml index d3ac817a..62450a7f 100644 --- a/layouts/taxonomy/rss.xml +++ b/layouts/taxonomy/rss.xml @@ -1,13 +1,13 @@ - {{- .Title }} - {{ T .Data.Singular | default .Data.Singular }} - {{ .Site.Title -}} + {{- .Title }} - {{ T .Data.Singular | default .Data.Singular }} | {{ .Site.Title -}} {{- .Permalink -}} - {{- .Title }} - {{ T .Data.Singular | default .Data.Singular }} - {{ .Site.Title -}} + {{- .Title }} - {{ T .Data.Singular | default .Data.Singular }} | {{ .Site.Title -}} Hugo -- gohugo.io {{- with .Site.LanguageCode -}} diff --git a/layouts/taxonomy/terms.html b/layouts/taxonomy/terms.html index 148032c0..bd42cb85 100644 --- a/layouts/taxonomy/terms.html +++ b/layouts/taxonomy/terms.html @@ -1,5 +1,5 @@ {{- define "title" -}} - {{- .Params.Title | default (T .Data.Plural) | default .Data.Plural | dict "Some" | T "allSome" }} - {{ .Site.Title -}} + {{- .Params.Title | default (T .Data.Plural) | default .Data.Plural | dict "Some" | T "allSome" }} | {{ .Site.Title -}} {{- end -}} {{- define "content" -}}