From 4e7865c1853ef2edbf2dd2184aeab29aeb1d1b64 Mon Sep 17 00:00:00 2001 From: Zeyu Huang Date: Wed, 6 Mar 2024 16:37:31 +0800 Subject: [PATCH 1/6] fix(i18n): add missing `zh-cn` translations (#964) --- i18n/zh-cn.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/i18n/zh-cn.yaml b/i18n/zh-cn.yaml index 9350c2b..da39c8f 100644 --- a/i18n/zh-cn.yaml +++ b/i18n/zh-cn.yaml @@ -4,6 +4,13 @@ toggleMenu: darkMode: other: 暗色模式 +list: + page: "{{ .Count }} 个页面" + + section: 章节 + + subsection: 子章节 + article: back: other: 返回 @@ -54,7 +61,7 @@ search: footer: builtWith: - other: Built with {{ .Generator }} + other: 使用 {{ .Generator }} 构建 designedBy: other: 主题 {{ .Theme }} 由 {{ .DesignedBy }} 设计 From 43224bd39a71ba197617ccdbdd6bd02f3e0a4eb4 Mon Sep 17 00:00:00 2001 From: Jimmy Cai Date: Sun, 10 Mar 2024 19:54:09 +0100 Subject: [PATCH 2/6] feat: update Hugo version and minimum version requirement to 0.123.0 (#970) --- netlify.toml | 2 +- theme.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/netlify.toml b/netlify.toml index 229f970..9ad85f1 100644 --- a/netlify.toml +++ b/netlify.toml @@ -2,7 +2,7 @@ publish = "exampleSite/public" [build.environment] - HUGO_VERSION = "0.117.0" + HUGO_VERSION = "0.123.8" HUGO_THEME = "repo" [context.production] diff --git a/theme.toml b/theme.toml index a1a3d74..6c5ea62 100644 --- a/theme.toml +++ b/theme.toml @@ -20,7 +20,7 @@ features = [ "search", ] -min_version = "0.87.0" +min_version = "0.123.0" [author] name = "Jimmy Cai" From 4948a3723e42fb775f4d895e4d173c5521be81b9 Mon Sep 17 00:00:00 2001 From: Andreas Deininger Date: Sun, 10 Mar 2024 19:57:03 +0100 Subject: [PATCH 3/6] fix: `.Site.LastChange` deprecation (#968) Fix the deprecation warning emitted from Hugo, and fix the typo in ` exampleSite/content/page/about/index.md` --- exampleSite/content/page/about/index.md | 4 ++-- layouts/partials/head/opengraph/provider/base.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/exampleSite/content/page/about/index.md b/exampleSite/content/page/about/index.md index 494cb46..68911f9 100644 --- a/exampleSite/content/page/about/index.md +++ b/exampleSite/content/page/about/index.md @@ -15,7 +15,7 @@ menu: icon: user --- -Written in Go, Hugo is an open source static site generator available under the [Apache Licence 2.0.](https://github.com/gohugoio/hugo/blob/master/LICENSE) Hugo supports TOML, YAML and JSON data file types, Markdown and HTML content files and uses shortcodes to add rich content. Other notable features are taxonomies, multilingual mode, image processing, custom output formats, HTML/CSS/JS minification and support for Sass SCSS workflows. +Written in Go, Hugo is an open source static site generator available under the [Apache License 2.0.](https://github.com/gohugoio/hugo/blob/master/LICENSE) Hugo supports TOML, YAML and JSON data file types, Markdown and HTML content files and uses shortcodes to add rich content. Other notable features are taxonomies, multilingual mode, image processing, custom output formats, HTML/CSS/JS minification and support for Sass SCSS workflows. Hugo makes use of a variety of open source projects including: @@ -29,6 +29,6 @@ Hugo is ideal for blogs, corporate websites, creative portfolios, online magazin Hugo is for people who want to hand code their own website without worrying about setting up complicated runtimes, dependencies and databases. -Websites built with Hugo are extremelly fast, secure and can be deployed anywhere including, AWS, GitHub Pages, Heroku, Netlify and any other hosting provider. +Websites built with Hugo are extremely fast, secure and can be deployed anywhere including, AWS, GitHub Pages, Heroku, Netlify and any other hosting provider. Learn more and contribute on [GitHub](https://github.com/gohugoio). diff --git a/layouts/partials/head/opengraph/provider/base.html b/layouts/partials/head/opengraph/provider/base.html index 3e51d37..60da962 100644 --- a/layouts/partials/head/opengraph/provider/base.html +++ b/layouts/partials/head/opengraph/provider/base.html @@ -32,8 +32,8 @@ {{- end -}} {{- else -}} - {{- if not .Site.LastChange.IsZero -}} - + {{- if not .Site.Lastmod.IsZero -}} + {{- end -}} {{- end -}} From 2cda77970651fa47f853318668063975107635bc Mon Sep 17 00:00:00 2001 From: Andreas Deininger Date: Sun, 10 Mar 2024 22:24:21 +0100 Subject: [PATCH 4/6] feat: bump KaTeX to latest released version `0.16.9` (#969) Bump KaTeX to latest released version 0.16.9 --- data/external.yaml | 12 ++++++------ exampleSite/content/post/math-typesetting/index.md | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/data/external.yaml b/data/external.yaml index 777620d..4fc0bca 100644 --- a/data/external.yaml +++ b/data/external.yaml @@ -21,17 +21,17 @@ PhotoSwipe: type: style KaTeX: - - src: https://cdn.jsdelivr.net/npm/katex@0.15.6/dist/katex.min.css - integrity: sha256-J+iAE0sgH8QSz9hpcDxXIftnj65JEZgNhGcgReTTK9s= + - src: https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.css + integrity: sha384-n8MVd4RsNIU0tAv4ct0nTaAbDJwPJzDEaqSD1odI+WdtXRGWt2kTvGFasHpSy3SV type: style - - src: https://cdn.jsdelivr.net/npm/katex@0.15.6/dist/katex.min.js - integrity: sha256-InsNdER1b2xUewP+pKCUJpkhiqwHgqiPXDlIk7GzBu4= + - src: https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.js + integrity: sha384-XjKyOOlGwcjNTAIQHIpgOno0Hl1YQqzUOEleOLALmuqehneUG+vnGctmUb0ZY0l8 type: script defer: true - - src: https://cdn.jsdelivr.net/npm/katex@0.15.6/dist/contrib/auto-render.min.js - integrity: sha256-y39Mpg7V3D4lhBX4x6O0bUqTV4pSrfgwEfGKfxkOdgI= + - src: https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/contrib/auto-render.min.js + integrity: sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05 type: script defer: true diff --git a/exampleSite/content/post/math-typesetting/index.md b/exampleSite/content/post/math-typesetting/index.md index ce8d0bf..060fd7f 100644 --- a/exampleSite/content/post/math-typesetting/index.md +++ b/exampleSite/content/post/math-typesetting/index.md @@ -21,17 +21,17 @@ In this example we will be using [KaTeX](https://katex.org/) {{ end }} ``` -- To enable KaTex globally set the parameter `math` to `true` in a project's configuration -- To enable KaTex on a per page basis include the parameter `math: true` in content files +- To enable KaTeX globally set the parameter `math` to `true` in a project's configuration +- To enable KaTeX on a per page basis include the parameter `math: true` in content files **Note:** Use the online reference of [Supported TeX Functions](https://katex.org/docs/supported.html) {{< math.inline >}} {{ if or .Page.Params.math .Site.Params.math }} - - - + + + {{ end }} {{}} From 6c7d42d45a0ca79f1047270d61cd46ab7b81f60e Mon Sep 17 00:00:00 2001 From: Jiahao Li <42709836+TheJiahao@users.noreply.github.com> Date: Sun, 10 Mar 2024 23:56:30 +0200 Subject: [PATCH 5/6] fix(sidebar): menu-bottom-section not showing in mobile (#966) * fix(sidebar): Bottom section not showing in mobile * fix(sidebar): Align bottom section to bottom * fix(sidebar): Gap missing in bottom section * refactor(sidebar): Simplify styles * refactor(sidebar): Remove useless padding-left * refactor(sidebar): Remove useless margin-top * refactor(sidebar): Combine duplicate flex-direction * refactor(sidebar): Remove redundant width --- assets/scss/partials/menu.scss | 24 ++++++++------- layouts/partials/sidebar/left.html | 48 +++++++++++++++--------------- 2 files changed, 37 insertions(+), 35 deletions(-) diff --git a/assets/scss/partials/menu.scss b/assets/scss/partials/menu.scss index 281dc3a..19476ac 100644 --- a/assets/scss/partials/menu.scss +++ b/assets/scss/partials/menu.scss @@ -127,10 +127,8 @@ } /* Menu style */ -.menu { - padding-left: 0; +#main-menu { list-style: none; - flex-direction: column; overflow-y: auto; flex-grow: 1; font-size: 1.4rem; @@ -141,13 +139,15 @@ margin: 0 calc(var(--container-padding) * -1); padding: 30px 30px; + @include respond(xl) { padding: 15px 0; } - &, - .menu-bottom-section { + &, .menu-bottom-section ol { + flex-direction: column; gap: 30px; + @include respond(xl) { gap: 25px; } @@ -200,13 +200,15 @@ font-weight: bold; } } - } - .menu-bottom-section { - margin-top: auto; - display: flex; - flex-direction: column; - width: 100%; + &.menu-bottom-section { + margin-top: auto; + + ol { + display: flex; + padding-left: 0; + } + } } } diff --git a/layouts/partials/sidebar/left.html b/layouts/partials/sidebar/left.html index 3aed883..e390a9f 100644 --- a/layouts/partials/sidebar/left.html +++ b/layouts/partials/sidebar/left.html @@ -74,30 +74,30 @@ {{ end }} - - + + + From 04bf1956b9cf21a6af6b2e8432f3b151a81f8c10 Mon Sep 17 00:00:00 2001 From: Jimmy Cai Date: Sun, 10 Mar 2024 22:57:26 +0100 Subject: [PATCH 6/6] release: 3.24.0 --- layouts/partials/footer/footer.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/footer/footer.html b/layouts/partials/footer/footer.html index 4b9d26e..9ef3768 100644 --- a/layouts/partials/footer/footer.html +++ b/layouts/partials/footer/footer.html @@ -1,4 +1,4 @@ -{{- $ThemeVersion := "3.23.0" -}} +{{- $ThemeVersion := "3.24.0" -}}