From 52426b4cefb0fab3df44227f6d23616585f5ac20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=A1=E6=A2=A6=E6=98=9F=E5=B0=98?= Date: Mon, 13 Jun 2022 15:04:06 +0800 Subject: [PATCH 01/11] :lipstick: Add categories & tags page's title. --- i18n/en.yaml | 14 +++++++++----- i18n/zh-cn.yaml | 14 +++++++++----- layouts/_default/terms.html | 15 +++++++++++++-- 3 files changed, 31 insertions(+), 12 deletions(-) diff --git a/i18n/en.yaml b/i18n/en.yaml index 2c969d6..0299c79 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -1,16 +1,20 @@ #-------------------------------------- # English Version #-------------------------------------- -posts: +Posts: other: Posts -tag: +Tag: other: Tag -tags: +Tags: other: Tags -category: +TagTitle: + other: Tag Collection +Category: other: Category -categories: +Categories: other: Categories +CateTitle: + other: Classify Management AllSome: other: "All {{ .Some }}" diff --git a/i18n/zh-cn.yaml b/i18n/zh-cn.yaml index 94bf85b..0bacd1f 100644 --- a/i18n/zh-cn.yaml +++ b/i18n/zh-cn.yaml @@ -2,16 +2,20 @@ # 中文版本 #-------------------------------------- -posts: +Posts: other: 文章 -tag: +Tag: other: 标签 -tags: +Tags: other: 标签 -category: +TagTitle: + other: 标签集锦 +Category: other: 分类 -categories: +Categories: other: 分类 +CateTitle: + other: 分类管理 AllSome: other: "所有 {{ .Some }}" diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html index 50992ab..a4b5e10 100644 --- a/layouts/_default/terms.html +++ b/layouts/_default/terms.html @@ -4,7 +4,16 @@ {{- define "main_inner_class" }}{{.Data.Plural}} posts-expand{{ end -}} {{- define "main" }}
- +
+

+ {{- if eq .Data.Plural "categories" }} + {{- T "CateTitle" }} + {{- else if eq .Data.Plural "tags" }} + {{- T "TagTitle" }} + {{- end }} +

+
+
{{- if eq .Data.Plural "categories" }} {{ $cats := .Site.Taxonomies.categories }}
@@ -33,7 +42,9 @@ {{ $randNums := (seq 10) }} {{- range $name, $items := $tags }} {{ $name }} - ({{ len $items }}) + + ({{ len $items }}) + {{- end }}
From 48d36a2a54d2d4b4d75ec686482d61bd93b59f9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=A1=E6=A2=A6=E6=98=9F=E5=B0=98?= Date: Mon, 13 Jun 2022 19:59:22 +0800 Subject: [PATCH 02/11] :bug: Fixed the post header meta information. --- i18n/en.yaml | 19 ++++++++----------- i18n/zh-cn.yaml | 6 +++--- .../partials/post/header_meta/categories.html | 2 +- 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/i18n/en.yaml b/i18n/en.yaml index 0299c79..2261e0d 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -31,17 +31,17 @@ SymbolComma: SymbolPeriod: other: "." -SitePostsTitle: +SbPostsLable: other: "Posts" -SiteCatesTitle: +SbCatesTitle: other: "Categories" -SiteTagsTitle: +SbTagsTitle: other: "Tags" TableOfContents: other: "TOC" SiteOverview: other: "Overview" -RSSTitle: +RSSLable: other: "RSS Subscribe" CCLinkTitle: other: "Creative Commons" @@ -50,15 +50,12 @@ BackTopLabel: TagsCounterTitle: zero: No tags - one: 1 tag in total other: "{{ .Count }} tags in total" CatesCounterTitle: zero: No categories - one: 1 category in total other: "{{ .Count }} categories in total" ArchiveCounterTitle: zero: No posts. - one: 1 post. other: "{{ .Count }} posts in total." PostArchiveCheersUm: @@ -79,13 +76,15 @@ PostArchiveKeepOn: PostStickyTitle: other: Strickys PostPublishDate: - other: "Publish" + other: "Publish on" PostPublishTime: other: "Create Time" PostLastModDate: - other: "Update" + other: "Update on" PostLastModTime: other: "Modify Time" +PostCategory: + other: "Classify at" PostWords: other: "Words" PostWordCount: @@ -96,8 +95,6 @@ PostReadTime: other: "{{- .ReadingTime -}}min" PostViews: other: "Views" -PostCatg: - other: "Categories" PostTag: other: "Tags" PostReadMore: diff --git a/i18n/zh-cn.yaml b/i18n/zh-cn.yaml index 0bacd1f..e2819c3 100644 --- a/i18n/zh-cn.yaml +++ b/i18n/zh-cn.yaml @@ -84,6 +84,8 @@ PostLastModDate: other: 更新于 PostLastModTime: other: 修改时间 +PostCategory: + other: "分类于" PostWords: other: 字数 PostWordCount: @@ -94,8 +96,6 @@ PostReadTime: other: "{{- .ReadingTime -}}分钟" PostViews: other: 浏览 -PostCatgs: - other: 分类 PostTags: other: 标签 PostReadMore: @@ -135,7 +135,7 @@ RewardBitcoin: PostCommentTitle: other: 评论交流 -UserVistorsLabel: +VisitorsLabel: other: 总访客量 PageViewsLabel: other: 总访问量 diff --git a/layouts/partials/post/header_meta/categories.html b/layouts/partials/post/header_meta/categories.html index e0dc326..ab6acd8 100644 --- a/layouts/partials/post/header_meta/categories.html +++ b/layouts/partials/post/header_meta/categories.html @@ -4,7 +4,7 @@ - + {{- range (first 1 .Params.categories) }} +

{{ $title }}

diff --git a/layouts/partials/header/menus.html b/layouts/partials/header/menus.html index b286f3e..d4ba243 100644 --- a/layouts/partials/header/menus.html +++ b/layouts/partials/header/menus.html @@ -6,7 +6,7 @@ {{- $active := or ($curP.IsMenuCurrent "main" .) ($curP.HasMenuCurrent "main" .) }} {{- $active = or $active (eq .URL "/")}}
  • From 42f4028f2d37b9d1db1e3c7704acd2670ec3e546 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=A1=E6=A2=A6=E6=98=9F=E5=B0=98?= Date: Thu, 16 Jun 2022 19:57:49 +0800 Subject: [PATCH 08/11] :bug: Fixed the post creative commons link & post end style only work in page section. --- exampleSite/config.yaml | 1 + layouts/partials/head/style.html | 5 ++++- layouts/partials/post/footer_meta/copyright.html | 7 +++---- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 63dae73..8e8ed5a 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -7,6 +7,7 @@ baseURL: / theme: hugo-theme-next +canonifyURLs: true paginate: 8 diff --git a/layouts/partials/head/style.html b/layouts/partials/head/style.html index c74a448..7b54c39 100644 --- a/layouts/partials/head/style.html +++ b/layouts/partials/head/style.html @@ -23,8 +23,11 @@ {{- $css := $scss | toCSS (dict "targetPath" "/css/main.css" "outputStyle" "expanded") }} +{{- if .IsPage }} \ No newline at end of file + +{{- end }} + \ No newline at end of file diff --git a/layouts/partials/post/footer_meta/copyright.html b/layouts/partials/post/footer_meta/copyright.html index d048896..403975d 100644 --- a/layouts/partials/post/footer_meta/copyright.html +++ b/layouts/partials/post/footer_meta/copyright.html @@ -19,16 +19,15 @@ {{- if isset .Params "link" }} {{ print (T "PostCROriginLink") (T "SymbolColon") }} {{ .Params.Link }} - {{- else }} + {{- else }} {{ print (T "PostCRLink") (T "SymbolColon") }} - {{ .Permalink }} + {{ .RelPermalink | absLangURL }} {{- end }}
  • {{ print (T "PostCRLicenseTitle") (T "SymbolColon") }} {{- $ccText := .Site.Params.creativeCommons.license | upper }} - {{- $lang := .Scratch.Get "lang" }} - {{- $ccLink := printf "%s" (substr $lang 0 2) $ccText }} + {{- $ccLink := printf "%s" (substr .Site.LanguageCode 0 2) $ccText }} {{ printf (T "PostCRLicenseContent") $ccLink | safeHTML }}
  • From 32a7195f7b30964729609f3a43c41e99d116d966 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=A1=E6=A2=A6=E6=98=9F=E5=B0=98?= Date: Thu, 16 Jun 2022 20:15:15 +0800 Subject: [PATCH 09/11] :bug: Fixed the post creative commons link reference. --- layouts/partials/post/footer_meta/copyright.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/post/footer_meta/copyright.html b/layouts/partials/post/footer_meta/copyright.html index 403975d..edc35bf 100644 --- a/layouts/partials/post/footer_meta/copyright.html +++ b/layouts/partials/post/footer_meta/copyright.html @@ -21,7 +21,7 @@ {{ .Params.Link }} {{- else }} {{ print (T "PostCRLink") (T "SymbolColon") }} - {{ .RelPermalink | absLangURL }} + {{ .Permalink | absLangURL }} {{- end }}
  • From 1b08f8ada135518b785e257a6c99c66a9b90fcae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=A1=E6=A2=A6=E6=98=9F=E5=B0=98?= Date: Thu, 16 Jun 2022 20:48:22 +0800 Subject: [PATCH 10/11] :memo: Add demo site links. --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a6906e1..edc98f2 100644 --- a/README.md +++ b/README.md @@ -6,4 +6,11 @@ Start a new journey for Hugo's theme of NexT. # Our Vision -Make `NexT` theme is easily & powerful. \ No newline at end of file +Make `NexT` theme is easily & powerful. + +# Preview + +| Environment | :gemini: (**Default**) | :heart_decoration: | :pisces: | Status | +| :---: | :--- | :--- | :--- | :---: | +| Preliminary | [Gemini](https://hugo-next-dev.vercel.app/) | [Muse](https://hugo-next-dev.vercel.app/muse/) | [Mist](https://hugo-next-dev.vercel.app/mist/) | [Pisces](https://hugo-next-dev.vercel.app/pisces/) | ![Vercel](https://therealsujitk-vercel-badge.vercel.app/?app=hugo-next-dev&style=for-the-badge) | +| Production | [Gemini](https://hugo-next-prod.vercel.app/) | [Muse](https://hugo-next-prod.vercel.app/muse/) | [Mist](https://hugo-next-prod.vercel.app/mist/) | [Pisces](https://hugo-next-prod.vercel.app/pisces/) | ![Vercel](https://therealsujitk-vercel-badge.vercel.app/?app=hugo-next-prod&style=for-the-badge) | \ No newline at end of file From 51f95b6bbaebef9bf706f78b23a2cba0d2e6e206 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=A1=E6=A2=A6=E6=98=9F=E5=B0=98?= Date: Thu, 16 Jun 2022 20:51:57 +0800 Subject: [PATCH 11/11] :memo: Fixed table content. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index edc98f2..cd4ff8f 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Make `NexT` theme is easily & powerful. # Preview -| Environment | :gemini: (**Default**) | :heart_decoration: | :pisces: | Status | -| :---: | :--- | :--- | :--- | :---: | +| Environment | :gemini: (**Default**) | :heart_decoration: | :six_pointed_star: | :pisces: | Status | +| :---: | :---: | :---: | :---: | :---: | :---: | | Preliminary | [Gemini](https://hugo-next-dev.vercel.app/) | [Muse](https://hugo-next-dev.vercel.app/muse/) | [Mist](https://hugo-next-dev.vercel.app/mist/) | [Pisces](https://hugo-next-dev.vercel.app/pisces/) | ![Vercel](https://therealsujitk-vercel-badge.vercel.app/?app=hugo-next-dev&style=for-the-badge) | | Production | [Gemini](https://hugo-next-prod.vercel.app/) | [Muse](https://hugo-next-prod.vercel.app/muse/) | [Mist](https://hugo-next-prod.vercel.app/mist/) | [Pisces](https://hugo-next-prod.vercel.app/pisces/) | ![Vercel](https://therealsujitk-vercel-badge.vercel.app/?app=hugo-next-prod&style=for-the-badge) | \ No newline at end of file