From 03ee3369e1bfe794b5233c4661e66230a5944d69 Mon Sep 17 00:00:00 2001 From: Jimmy Cai Date: Mon, 19 Feb 2024 10:54:02 +0100 Subject: [PATCH 1/7] fix: title does not show pagination data (#945) * fix: title does not show pagination data This is caused by partialCached. It turns out that the `.RelPermalink` is the same for all pages generated by the paginator, so they will show the same title as the first page. closes https://github.com/CaiJimmy/hugo-theme-stack/issues/941 * doc(exampleSite): set paginate to 3 to force pagination --- exampleSite/config.yaml | 2 +- layouts/partials/head/head.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index b723dea..57034a7 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -1,7 +1,7 @@ baseurl: https://example.com languageCode: en-us theme: hugo-theme-stack -paginate: 5 +paginate: 3 title: Example Site copyright: Example Person diff --git a/layouts/partials/head/head.html b/layouts/partials/head/head.html index be63710..c809636 100644 --- a/layouts/partials/head/head.html +++ b/layouts/partials/head/head.html @@ -5,7 +5,7 @@ {{ with .Params.Keywords }}{{ end }} -{{- $title := partialCached "data/title" . .RelPermalink -}} +{{- $title := partial "data/title" . -}} {{ $title }} From 76dc61f0d5103d8248f416d28c3a0ff6dd87e182 Mon Sep 17 00:00:00 2001 From: Gleb A <94681073+gleb-kun@users.noreply.github.com> Date: Fri, 23 Feb 2024 02:03:55 +0300 Subject: [PATCH 2/7] feat(i18n): add Belarusian translation (#937) * feat(i18n): add Belarusian translation * Removed .gitignore changes --- i18n/be.yaml | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 i18n/be.yaml diff --git a/i18n/be.yaml b/i18n/be.yaml new file mode 100644 index 0000000..605cd08 --- /dev/null +++ b/i18n/be.yaml @@ -0,0 +1,72 @@ +toggleMenu: + other: Паказаць/схаваць меню + +darkMode: + other: Цёмны рэжым + +list: + page: + one: "{{ .Count }} старонка" + few: "{{ .Count }} старонкі" + many: "{{ .Count }} старонак" + other: "{{ .Count }} старонкі" + + section: + other: Раздзел + + subsection: + one: Падраздзел + few: Падраздзелы + many: Падраздзелы + other: Падраздзелы + +article: + back: + other: Назад + + relatedContent: + other: Таксама рэкамендуем + + lastUpdatedOn: + other: Абноўлена + + tableOfContents: + other: Змест + + readingTime: + other: "Час чытання: {{ .Count }} хв." + +notFound: + title: + other: Не знойдзена + + subtitle: + other: Запытваемая старонка не існуе + +widget: + archives: + title: + other: Архівы + more: + other: Яшчэ + + tagCloud: + title: + other: Тэгі + +search: + title: + other: Пошук + + placeholder: + other: Увядзіце нешта... + + resultTitle: + other: "Знайдзена #PAGES_COUNT старонак (за #TIME_SECONDS с.)" + +footer: + builtWith: + other: Створана пры дапамозе {{ .Generator }} + + designedBy: + other: Тэма {{ .Theme }}, дызайн {{ .DesignedBy }} From 188e49ef41f73e808f3c158f7d80a570f20c0f35 Mon Sep 17 00:00:00 2001 From: WaterLemons2k <62788816+WaterLemons2k@users.noreply.github.com> Date: Sat, 24 Feb 2024 06:00:39 +0800 Subject: [PATCH 3/7] fix(widgets): ensure `params` is not nil (#943) * fix(partials): ensure params always exist If the `params` key is not defined in the config file, accessing `params` results in a `nil pointer evaluating interface {}` error because `params` does not exist. This can be fixed by ensuring that params is always a map. * style(widgets): `default` no pipes required --- layouts/partials/sidebar/right.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/layouts/partials/sidebar/right.html b/layouts/partials/sidebar/right.html index d2a6ae8..6333f10 100644 --- a/layouts/partials/sidebar/right.html +++ b/layouts/partials/sidebar/right.html @@ -4,7 +4,10 @@