From dc4332a252d043da6c6e4421210e80c8626b9d62 Mon Sep 17 00:00:00 2001 From: Klemens Dickbauer Date: Mon, 2 Oct 2023 01:18:24 +0200 Subject: [PATCH 01/24] added lastmode date after slash in the post header if available. Signed-off-by: kdi --- layouts/partials/post-meta.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/layouts/partials/post-meta.html b/layouts/partials/post-meta.html index e46eb0e8..2500f688 100644 --- a/layouts/partials/post-meta.html +++ b/layouts/partials/post-meta.html @@ -11,6 +11,10 @@ {{ partial "sprite" (dict "icon" "calendar") }} {{- $scratch.Set "writeSeparator" true }} {{- end }} From 46ba1ae0afae24d1cad3bd39e7c55ef4a64bfda6 Mon Sep 17 00:00:00 2001 From: Klemens Dickbauer Date: Mon, 2 Oct 2023 01:28:37 +0200 Subject: [PATCH 02/24] Update README.md for lastmod attribute Signed-off-by: kdi --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 29d84f7e..9a27fb46 100644 --- a/README.md +++ b/README.md @@ -267,6 +267,7 @@ These options can be set from a page [frontmatter](https://gohugo.io/content-man |:-------------------- | ------------------ | ---------------- | | title | string | N/A | | date | date | N/A | +| lastmod | date | N/A | | description | string | N/A | | keywords | array of strings | yes | | introDescription | string | yes | From 8790399fa282118b2b58a9e221441f82701f0178 Mon Sep 17 00:00:00 2001 From: Klemens Dickbauer Date: Tue, 3 Oct 2023 00:59:07 +0200 Subject: [PATCH 03/24] added parameters for last modified rendering Signed-off-by: kdi --- layouts/partials/post-meta.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/layouts/partials/post-meta.html b/layouts/partials/post-meta.html index 2500f688..386ae114 100644 --- a/layouts/partials/post-meta.html +++ b/layouts/partials/post-meta.html @@ -1,5 +1,7 @@ {{- $showShare := ne (.Param "showshare") false }} {{- $showDate := ne (.Param "showdate") false }} +{{- $showLastmod := default false (.Param "showLastmod") }} +{{- $lastmodSeparator := default "/" (.Param "lastmodSeparator") }} {{- $showReadTime := ne (.Param "showreadtime") false }} {{- $showPostMeta := or ($showShare) ($showDate) ($showReadTime) (isset .Params "tags") }} {{- $scratch := newScratch }} @@ -11,8 +13,8 @@ {{ partial "sprite" (dict "icon" "calendar") }} From 27652180482cd281d5cb87b82853aae2496ed252 Mon Sep 17 00:00:00 2001 From: Klemens Dickbauer Date: Tue, 3 Oct 2023 01:01:47 +0200 Subject: [PATCH 04/24] added the showLastmod and lastmodSeparator params Signed-off-by: kdi --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 9a27fb46..a61d750b 100644 --- a/README.md +++ b/README.md @@ -291,6 +291,8 @@ These options can be set from a page [frontmatter](https://gohugo.io/content-man | comments | boolean | yes | | enableMathNotation | boolean | yes | | showDate | boolean | N/A | +| showLastmod | boolean | N/A | +| lastmodSeparator | string | N/A | | showShare | boolean | N/A | | showReadTime | boolean | N/A | | sidebar | boolean | N/A | From 28f11089005efa8a6cb591039b01873a262e2f81 Mon Sep 17 00:00:00 2001 From: Luke Hong Date: Tue, 19 Dec 2023 16:28:00 +0800 Subject: [PATCH 05/24] Fix unexpected posts in recent posts list issue Signed-off-by: Luke Hong Signed-off-by: kdi --- layouts/partials/sidebar.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index 17b18b24..d649615b 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -72,7 +72,7 @@

{{ T "featured_posts" }}

{{ T "recent_posts" }}

    {{- $recent := default 8 $s.numberOfRecentPosts }} - {{- range first $recent $posts | symdiff $featuredPosts }} + {{- range first $recent ($posts | symdiff $featuredPosts) }}
  • {{ .Title | markdownify }}
  • From 043ddf147ef5ecb6f0c83a3a4125393ce2037ff5 Mon Sep 17 00:00:00 2001 From: Jokey Li Date: Sat, 2 Mar 2024 18:08:06 +0800 Subject: [PATCH 06/24] Improve Chinese translator text Signed-off-by: Jokey Li Signed-off-by: kdi --- i18n/zh-CN.toml | 20 ++++++++++++++++++-- i18n/zh-TW.toml | 20 ++++++++++++++++++-- i18n/zh.toml | 20 ++++++++++++++++++-- 3 files changed, 54 insertions(+), 6 deletions(-) diff --git a/i18n/zh-CN.toml b/i18n/zh-CN.toml index b53c86d6..bcfd27ed 100644 --- a/i18n/zh-CN.toml +++ b/i18n/zh-CN.toml @@ -50,7 +50,23 @@ other = "所有专栏" other = "文章目录" [reading_time] -other = "{{ .ReadingTime }} min read" +other = "{{ .ReadingTime }} 分钟阅读" [series_posts] -other = "Posts in this series" +other = "相关系列文章" + +# search +[quick_links] + other = "搜索到的结果" +[no_matches] + other = "未找到结果" +[search_field_placeholder] + other = "搜索知识库" +[blog_search_field_placeholder] + other = "搜索内容..." +[search_results_label] + other = "搜索到的结果" +[short_search_query] + other = "搜索字符太短" +[type_to_search] + other = "请输入内容查找" \ No newline at end of file diff --git a/i18n/zh-TW.toml b/i18n/zh-TW.toml index 06b5c698..d6b9fd21 100644 --- a/i18n/zh-TW.toml +++ b/i18n/zh-TW.toml @@ -50,7 +50,23 @@ other = "所有專欄" other = "文章目錄" [reading_time] -other = "{{ .ReadingTime }} 分鐘長" +other = "{{ .ReadingTime }} 分鐘閱讀" [series_posts] -other = "此系列文章" +other = "相關係列文章" + +# search +[quick_links] + other = "搜尋到的結果" +[no_matches] + other = "未找到結果" +[search_field_placeholder] + other = "搜尋知識庫" +[blog_search_field_placeholder] + other = "搜尋內容..." +[search_results_label] + other = "搜尋到的結果" +[short_search_query] + other = "搜尋字元太短" +[type_to_search] + other = "請輸入內容尋找" \ No newline at end of file diff --git a/i18n/zh.toml b/i18n/zh.toml index b53c86d6..f6979a7f 100644 --- a/i18n/zh.toml +++ b/i18n/zh.toml @@ -50,7 +50,23 @@ other = "所有专栏" other = "文章目录" [reading_time] -other = "{{ .ReadingTime }} min read" +other = "{{ .ReadingTime }} 分钟阅读" [series_posts] -other = "Posts in this series" +other = "相关系列文章" + +# search +[quick_links] + other = "搜索到的结果" +[no_matches] + other = "未找到结果" +[search_field_placeholder] + other = "搜索知识库" +[blog_search_field_placeholder] + other = "搜索内容..." +[search_results_label] + other = "搜索到的结果" +[short_search_query] + other = "搜索字符太短" +[type_to_search] + other = "请输入内容查找" From 3be813c1244e99aa2c43a355a45e38a05d580650 Mon Sep 17 00:00:00 2001 From: Jokey Li Date: Sat, 2 Mar 2024 17:39:41 +0800 Subject: [PATCH 07/24] fix series_posts hard code display Signed-off-by: Jokey Li Signed-off-by: kdi --- layouts/partials/related.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/related.html b/layouts/partials/related.html index 757bcb54..123fd6da 100644 --- a/layouts/partials/related.html +++ b/layouts/partials/related.html @@ -1,6 +1,6 @@ {{ if isset .Params "series" }} {{$related := where .Site.RegularPages ".Params.series" "eq" .Params.series }} -

    Posts in this Series

    +

    {{ T "series_posts" }}

      {{ range $related }}
    • {{ .Title }}
    • From f18a267000e04a350d9d3616401a772851ce646a Mon Sep 17 00:00:00 2001 From: Jack Hughes Date: Tue, 30 Jan 2024 14:55:08 +0000 Subject: [PATCH 08/24] Fix icons/src property so that it does not 404 Signed-off-by: digitalbricklayer Signed-off-by: kdi --- static/icons/site.webmanifest | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/icons/site.webmanifest b/static/icons/site.webmanifest index de65106f..6d25c20e 100644 --- a/static/icons/site.webmanifest +++ b/static/icons/site.webmanifest @@ -3,12 +3,12 @@ "short_name": "", "icons": [ { - "src": "/android-chrome-192x192.png", + "src": "android-chrome-192x192.png", "sizes": "192x192", "type": "image/png" }, { - "src": "/android-chrome-256x256.png", + "src": "android-chrome-256x256.png", "sizes": "256x256", "type": "image/png" } From 72f6392cc856e8ac0a32b79b4cb25f1d26b24385 Mon Sep 17 00:00:00 2001 From: Christian Stankowic Date: Fri, 29 Mar 2024 08:45:29 +0100 Subject: [PATCH 09/24] add noindex parameter Signed-off-by: Christian Stankowic Signed-off-by: kdi --- layouts/partials/head.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/layouts/partials/head.html b/layouts/partials/head.html index da8fcb53..7c562af5 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -10,6 +10,9 @@ {{- end }} {{ with $title }}{{ . }} {{ $separator }} {{ end }}{{ .Site.Title }} +{{ if .Params.noindex }} + +{{ end }} {{- with $params.ga_verify }} {{- end }} From 9c1d6acbc4ab601ac61ecd842629e7974c8b8155 Mon Sep 17 00:00:00 2001 From: Christian Stankowic Date: Fri, 29 Mar 2024 08:48:15 +0100 Subject: [PATCH 10/24] fix spacing Signed-off-by: Christian Stankowic Signed-off-by: kdi --- layouts/partials/head.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 7c562af5..ab249774 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -11,7 +11,7 @@ {{ with $title }}{{ . }} {{ $separator }} {{ end }}{{ .Site.Title }} {{ if .Params.noindex }} - + {{ end }} {{- with $params.ga_verify }} From cf6f528755eb3d9220c53e49d4b7ea6d0a2fb925 Mon Sep 17 00:00:00 2001 From: Christian Stankowic Date: Fri, 29 Mar 2024 08:58:26 +0100 Subject: [PATCH 11/24] update documentation Signed-off-by: Christian Stankowic Signed-off-by: kdi --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a61d750b..b8a76692 100644 --- a/README.md +++ b/README.md @@ -258,6 +258,7 @@ These options set global values that some pages or all pages in the site use by | showRelatedInSidebar | boolean | no | | footerLogo | string | N/A | | enableSearch | boolean | N/A | +| noindex | boolean | N/A | ### Page Parameters From ef43b45a75219d553a141ca97227a502704d8c65 Mon Sep 17 00:00:00 2001 From: Christian Stankowic Date: Sun, 28 Apr 2024 20:59:45 +0200 Subject: [PATCH 12/24] move parameter to proper documentation section Signed-off-by: Christian Stankowic Signed-off-by: kdi --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b8a76692..6b0a386b 100644 --- a/README.md +++ b/README.md @@ -258,7 +258,6 @@ These options set global values that some pages or all pages in the site use by | showRelatedInSidebar | boolean | no | | footerLogo | string | N/A | | enableSearch | boolean | N/A | -| noindex | boolean | N/A | ### Page Parameters @@ -299,6 +298,7 @@ These options can be set from a page [frontmatter](https://gohugo.io/content-man | sidebar | boolean | N/A | | singleColumn | boolean | N/A | | showRelatedInArticle | boolean | N/A | +| noindex | boolean | N/A | ### Modify Menus From 3ba622ee2f6a3afe9763f8137aca5ade617641c0 Mon Sep 17 00:00:00 2001 From: barefootstache Date: Sat, 14 Sep 2024 21:15:35 +0200 Subject: [PATCH 13/24] fix: onhover link icon color in dark mode Signed-off-by: barefootstache Signed-off-by: kdi --- assets/sass/_variables.sass | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/assets/sass/_variables.sass b/assets/sass/_variables.sass index afabd693..c79b982f 100644 --- a/assets/sass/_variables.sass +++ b/assets/sass/_variables.sass @@ -110,7 +110,9 @@ html img background: none svg - fill: #fafafa + fill: #fafafa + &:not(svg) + filter: invert(0.87) .sidebar &_inner &::before From d574dbc743bbdb03b022cf614705bdd8113c6918 Mon Sep 17 00:00:00 2001 From: Andreas Deininger Date: Fri, 13 Sep 2024 22:05:49 +0200 Subject: [PATCH 14/24] Fix errors and warnings Signed-off-by: Andreas Deininger Signed-off-by: kdi --- exampleSite/config/_default/{config.toml => hugo.toml} | 5 ++++- layouts/partials/comments.html | 2 +- layouts/partials/func/getDefaultLanguage.html | 2 +- layouts/partials/func/getStylesBundle.html | 2 +- layouts/partials/header.html | 2 +- theme.toml | 2 +- 6 files changed, 9 insertions(+), 6 deletions(-) rename exampleSite/config/_default/{config.toml => hugo.toml} (95%) diff --git a/exampleSite/config/_default/config.toml b/exampleSite/config/_default/hugo.toml similarity index 95% rename from exampleSite/config/_default/config.toml rename to exampleSite/config/_default/hugo.toml index b1dbfb87..387c99fd 100644 --- a/exampleSite/config/_default/config.toml +++ b/exampleSite/config/_default/hugo.toml @@ -4,7 +4,7 @@ baseurl = "https://example.com/" # Include trailing slash # title = "Clarity" # Edit directly from config/_default/languages.toml # alternatively, uncomment this and remove `title` entry from the aforemention file. copyright = "Copyright © 2008–2018, Steve Francia and the Hugo Authors; all rights reserved." # canonifyurls = true -paginate = 10 + theme = "hugo-clarity" disqusShortname = "" @@ -22,3 +22,6 @@ series = "series" [outputs] home = ["HTML", "RSS", "JSON"] + +[pagination] + pagerSize = 10 diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html index eb141351..311788ff 100644 --- a/layouts/partials/comments.html +++ b/layouts/partials/comments.html @@ -1,5 +1,5 @@
      - {{ if .Site.DisqusShortname }} + {{ if .Site.Config.Services.Disqus.Shortname }} {{ template "_internal/disqus.html" . }} {{ end }} {{ if .Site.Params.utterances }} diff --git a/layouts/partials/func/getDefaultLanguage.html b/layouts/partials/func/getDefaultLanguage.html index e8f55717..45911d36 100644 --- a/layouts/partials/func/getDefaultLanguage.html +++ b/layouts/partials/func/getDefaultLanguage.html @@ -1,5 +1,5 @@ {{ $defaultLanguage := site.LanguageCode }} -{{ if site.IsMultiLingual}} +{{ if hugo.IsMultilingual }} {{ $languages := site.Languages }} {{ $order := slice }} {{ range $languages }} diff --git a/layouts/partials/func/getStylesBundle.html b/layouts/partials/func/getStylesBundle.html index e35c4a5d..09dede67 100644 --- a/layouts/partials/func/getStylesBundle.html +++ b/layouts/partials/func/getStylesBundle.html @@ -1,6 +1,6 @@ {{ $options := (dict "targetPath" "css/styles.css" "outputStyle" "compressed" "enableSourceMap" "true") }} {{ $mainSassFile := "sass/main.sass" }} -{{ $styles := resources.Get $mainSassFile | resources.ExecuteAsTemplate $mainSassFile . | resources.ToCSS $options | resources.Fingerprint "sha512" }} +{{ $styles := resources.Get $mainSassFile | resources.ExecuteAsTemplate $mainSassFile . | css.Sass $options | resources.Fingerprint "sha512" }} {{ return $styles }} \ No newline at end of file diff --git a/layouts/partials/header.html b/layouts/partials/header.html index a348b6ee..8008bf14 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -16,7 +16,7 @@ {{- else }} {{ partial "nav" (dict "context" . "menu" .Site.Menus.main) }} {{- end }} - {{ if .Site.IsMultiLingual }} + {{ if hugo.IsMultilingual }}