From 36a830752076b56a13f8680e4a748ab314b4d0a2 Mon Sep 17 00:00:00 2001 From: F Y Date: Thu, 25 Mar 2021 22:51:39 -0400 Subject: [PATCH] Modified templates for Chinese section titles --- themes/hugo-prose/layouts/_default/list.html | 19 +++++++++++++++++-- .../hugo-prose/layouts/_default/sitemap.html | 10 +++++++++- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/themes/hugo-prose/layouts/_default/list.html b/themes/hugo-prose/layouts/_default/list.html index 743a285..feec448 100644 --- a/themes/hugo-prose/layouts/_default/list.html +++ b/themes/hugo-prose/layouts/_default/list.html @@ -3,7 +3,13 @@
{{ if not .IsHome }} -

{{ .Title }}

+

+ {{ if eq .Title "Posts" }} + 文章 + {{ else }} + {{ .Title }} + {{ end }} +

{{ end }} {{ with .Content }} @@ -50,7 +56,16 @@

{{ .Title }}

{{ if $.IsHome }} - {{ with .Section }}

{{ . }}

{{ end }} + {{ with .Section }} + {{ if (eq . "post") }} +

文章 + {{ else }} +

{{ . }} + {{ end }} +

+ {{ end }} + + {{ end }} diff --git a/themes/hugo-prose/layouts/_default/sitemap.html b/themes/hugo-prose/layouts/_default/sitemap.html index 17dfa2b..b3db239 100644 --- a/themes/hugo-prose/layouts/_default/sitemap.html +++ b/themes/hugo-prose/layouts/_default/sitemap.html @@ -8,7 +8,15 @@

{{ .Title }}

{{ range .Site.RegularPages.GroupBy "Section" }}
-

{{ .Key | pluralize | title }}

+

+ {{ if (eq .Key "post") }} + 文章 + {{ else if (eq .Key "card") }} + 作者 + {{ else }} + {{ .Key | pluralize | title }} + {{ end }} +

    {{ range sort .Pages "Date" "desc" }}