diff --git a/hugo.toml b/hugo.toml index 881c6533..b4b64cdb 100644 --- a/hugo.toml +++ b/hugo.toml @@ -67,6 +67,11 @@ hasCJKLanguage = true [permalinks] post = "/:year:month:day" +# 确保日期优先使用 Front Matter 中的 date +[frontmatter] + date = ["date", "publishDate", "lastmod"] + lastmod = ["lastmod", ":git", "date", "publishDate"] + # 输出格式配置 (Outputs) [outputs] home = ["HTML", "RSS", "JSON"] diff --git a/themes/Ying/layouts/404.html b/themes/Ying/layouts/404.html index fe296b48..eb341cfc 100644 --- a/themes/Ying/layouts/404.html +++ b/themes/Ying/layouts/404.html @@ -1,11 +1,153 @@ {{ define "main" }}
-

- 404 - 页面没找到 -

-

你想查看的页面已被转移或删除了

-

- -

+
+
+
404
+

页面未找到

+

抱歉,你访问的页面似乎已经去流浪了...

+ + + +
+
+ +
{{ end }} diff --git a/themes/Ying/layouts/_default/rss.xml b/themes/Ying/layouts/_default/rss.xml index 87557099..25c152bd 100644 --- a/themes/Ying/layouts/_default/rss.xml +++ b/themes/Ying/layouts/_default/rss.xml @@ -36,9 +36,9 @@ {{ .Title }} {{ .Permalink }} - {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} + {{ .PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} {{ with site.Author.email }}{{.}}{{ with site.Author.name }} ({{.}}){{end}}{{end}} - {{ .Permalink }} + {{ .Permalink }} {{ with .Description | html }}{{ . }}{{ else }}{{ .Summary | html }}{{ end -}} {{- if not site.Params.RSSNoContent}} {{ $image := printf `%s` (.Params.image | relURL) .Title }} diff --git a/themes/Ying/layouts/_default/single.html b/themes/Ying/layouts/_default/single.html index 8a5e09ce..2f524707 100644 --- a/themes/Ying/layouts/_default/single.html +++ b/themes/Ying/layouts/_default/single.html @@ -9,11 +9,13 @@ 浏览: 字数: {{ .WordCount }} 阅读: 约 {{ .ReadingTime }} 分钟 + {{ with .GetTerms "categories" }} 分类: - {{ range .GetTerms "categories" }} + {{ range . }} {{ .LinkTitle }} {{ end }} + {{ end }}