From 23607527e4bde0a289094ddc863f64381d9b01d7 Mon Sep 17 00:00:00 2001 From: Jimmy Cai Date: Wed, 27 Mar 2024 10:58:22 +0100 Subject: [PATCH 1/8] fix: use page resource permalink in link image (#990) closes https://github.com/CaiJimmy/hugo-theme-stack/issues/982 --- layouts/partials/article/components/links.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/layouts/partials/article/components/links.html b/layouts/partials/article/components/links.html index 118dbb3..a2ac26c 100644 --- a/layouts/partials/article/components/links.html +++ b/layouts/partials/article/components/links.html @@ -16,8 +16,12 @@ {{ with $link.image }} + {{ $permalink := . }} + {{ with ($.Resources.GetMatch (printf "%s" (. | safeURL))) }} + {{ $permalink = .RelPermalink }} + {{ end }}
- +
{{ end }} From b2157bdf784879cc01d8b1abb845a8b411d70824 Mon Sep 17 00:00:00 2001 From: andrewmoise Date: Wed, 27 Mar 2024 10:09:17 +0000 Subject: [PATCH 2/8] docs: update some invalid documentation links (#983) Update some documentation links (some were dead links) --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- exampleSite/hugo.yaml | 2 +- layouts/partials/sidebar/left.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 07743e1..81f8833 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -4,7 +4,7 @@ body: - type: markdown attributes: value: | - Thanks for taking the time to fill out this bug report! Please provide as much information as possible and make sure you have checked the [documentation](https://stack.jimmycai.com/). + Thanks for taking the time to fill out this bug report! Please provide as much information as possible and make sure you have checked the [documentation](https://stack.jimmycai.com/guide/). - type: textarea id: what-happened attributes: diff --git a/exampleSite/hugo.yaml b/exampleSite/hugo.yaml index d8c02fe..a1e3829 100644 --- a/exampleSite/hugo.yaml +++ b/exampleSite/hugo.yaml @@ -203,7 +203,7 @@ params: enabled: true ### Custom menu -### See https://docs.stack.jimmycai.com/configuration/custom-menu.html +### See https://stack.jimmycai.com/config/menu ### To remove about, archive and search page menu item, remove `menu` field from their FrontMatter menu: main: [] diff --git a/layouts/partials/sidebar/left.html b/layouts/partials/sidebar/left.html index e390a9f..3fd7fe4 100644 --- a/layouts/partials/sidebar/left.html +++ b/layouts/partials/sidebar/left.html @@ -65,7 +65,7 @@ {{ $icon := default .Pre .Params.Icon }} {{ if .Pre }} - {{ warnf "Menu item [%s] is using [pre] field to set icon, please use [params.icon] instead.\nMore information: https://docs.stack.jimmycai.com/configuration/custom-menu.html" .URL }} + {{ warnf "Menu item [%s] is using [pre] field to set icon, please use [params.icon] instead.\nMore information: https://stack.jimmycai.com/config/menu" .URL }} {{ end }} {{ with $icon }} {{ partial "helper/icon" . }} From 43e074364ca4bf55c175f994e32725123f3ec953 Mon Sep 17 00:00:00 2001 From: Shun Sakai Date: Wed, 27 Mar 2024 19:21:32 +0900 Subject: [PATCH 3/8] feat(i18n): update translations for `ja` (#984) * feat(i18n): update translations for `ja` * Apply review suggestions --- i18n/ja.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/i18n/ja.yaml b/i18n/ja.yaml index 40380fd..23a3169 100644 --- a/i18n/ja.yaml +++ b/i18n/ja.yaml @@ -4,6 +4,16 @@ toggleMenu: darkMode: other: ダークモード +list: + page: + other: "{{ .Count }} ページ目" + + section: + other: セクション + + subsection: + other: サブセクション + article: back: other: 前のページ @@ -54,7 +64,7 @@ search: footer: builtWith: - other: Built with {{ .Generator }} + other: {{ .Generator }} で構築されています。 designedBy: other: テーマ {{ .Theme }} は {{ .DesignedBy }} によって設計されています。 From f8466d94d208a8e4fed5c46f2d6026c657566d09 Mon Sep 17 00:00:00 2001 From: Jimmy Cai Date: Wed, 27 Mar 2024 16:01:43 +0100 Subject: [PATCH 4/8] fix(i18n): wrap `footer.builtWith` with double quotes in Japanese translation (#991) --- i18n/ja.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i18n/ja.yaml b/i18n/ja.yaml index 23a3169..12352ee 100644 --- a/i18n/ja.yaml +++ b/i18n/ja.yaml @@ -64,7 +64,7 @@ search: footer: builtWith: - other: {{ .Generator }} で構築されています。 + other: "{{ .Generator }} で構築されています。" designedBy: other: テーマ {{ .Theme }} は {{ .DesignedBy }} によって設計されています。 From 539c39d69a150d0024cde275b9c91b5365fa4ee1 Mon Sep 17 00:00:00 2001 From: Jimmy Cai Date: Wed, 27 Mar 2024 16:08:19 +0100 Subject: [PATCH 5/8] feat: add anchor link to markdown heading (#992) closes https://github.com/CaiJimmy/hugo-theme-stack/issues/935 --- layouts/_default/_markup/render-heading.html | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 layouts/_default/_markup/render-heading.html diff --git a/layouts/_default/_markup/render-heading.html b/layouts/_default/_markup/render-heading.html new file mode 100644 index 0000000..aa12d7d --- /dev/null +++ b/layouts/_default/_markup/render-heading.html @@ -0,0 +1,4 @@ + + # + {{ .Text | safeHTML }} + \ No newline at end of file From 797949b37f1a2f5f2d65b51239e3d22ec2d7e828 Mon Sep 17 00:00:00 2001 From: Jimmy Cai Date: Wed, 27 Mar 2024 16:24:03 +0100 Subject: [PATCH 6/8] fix: rename `.social-menu` to `.menu-social` to avoid being blocked by ad blockers (#993) closes https://github.com/CaiJimmy/hugo-theme-stack/issues/924 --- assets/scss/partials/menu.scss | 2 +- layouts/partials/sidebar/left.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/scss/partials/menu.scss b/assets/scss/partials/menu.scss index 19476ac..5b6be17 100644 --- a/assets/scss/partials/menu.scss +++ b/assets/scss/partials/menu.scss @@ -212,7 +212,7 @@ } } -.social-menu { +.menu-social { list-style: none; padding: 0; margin: 0; diff --git a/layouts/partials/sidebar/left.html b/layouts/partials/sidebar/left.html index 3fd7fe4..21e7d3e 100644 --- a/layouts/partials/sidebar/left.html +++ b/layouts/partials/sidebar/left.html @@ -38,7 +38,7 @@ {{- with .Site.Menus.social -}} -