From 080c86ec799b7f2058009159a36aa540705e202e Mon Sep 17 00:00:00 2001 From: Matthias Thym Date: Thu, 26 Aug 2021 18:23:55 +0200 Subject: [PATCH 01/10] feat(i18n): add German and Spanish translations for new features and refactor (#328) * feat(i18n): add German translations for new features and refactor add translation for feature `back` add translation for feature `tableOfContents` add translation for feature `readingTime` fix translation for feature `resultTitle` add newlines according to i18n en config * feat(i18n): add Spanish translations for new features and refactor add translation for feature `back` add translation for feature `tableOfContents` add translation for feature `readingTime` add newlines according to i18n en config --- i18n/de.yaml | 21 +++++++++++++++++++-- i18n/es.yaml | 17 +++++++++++++++++ 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/i18n/de.yaml b/i18n/de.yaml index 25a708a..00a8e11 100644 --- a/i18n/de.yaml +++ b/i18n/de.yaml @@ -17,23 +17,37 @@ list: other: Unterabschnitte article: + back: + other: Zurück + + tableOfContents: + other: Inhaltsverzeichnis + relatedContents: other: Verwandte Inhalte + lastUpdatedOn: other: Zuletzt aktualisiert am + readingTime: + one: "{{ .Count }} Minute Lesezeit" + other: "{{ .Count }} Minuten Lesezeit" + notFound: title: other: Seite nicht gefunden + subtitle: - other: Diese Seite existiert nicht. + other: Diese Seite existiert nicht widget: archives: title: other: Archiv + more: other: Weitere + tagCloud: title: other: Schlagwörter @@ -41,13 +55,16 @@ widget: search: title: other: Suche + placeholder: other: Etwas tippen... + resultTitle: - other: "#PAGES_COUNT pages (#TIME_SECONDS seconds)" + other: "#PAGES_COUNT Seiten (#TIME_SECONDS Sekunden)" footer: builtWith: other: Erstellt mit {{ .Generator }} + designedBy: other: Theme {{ .Theme }} gestaltet von {{ .DesignedBy }} diff --git a/i18n/es.yaml b/i18n/es.yaml index d82698b..9e1d6e1 100644 --- a/i18n/es.yaml +++ b/i18n/es.yaml @@ -17,14 +17,26 @@ list: other: Subsecciones article: + back: + other: Volver + + tableOfContents: + other: Tabla de contenido + relatedContents: other: Contenidos relacionados + lastUpdatedOn: other: Última vez actualizado + readingTime: + one: "{{ .Count }} minuto a leer" + other: "{{ .Count }} minutos a leer" + notFound: title: other: No Encontrado + subtitle: other: Esta página no existe @@ -32,8 +44,10 @@ widget: archives: title: other: Archivo + more: other: Más + tagCloud: title: other: Etiquetas @@ -41,13 +55,16 @@ widget: search: title: other: Búsqueda + placeholder: other: Teclea algo... + resultTitle: other: "#PAGES_COUNT páginas en (#TIME_SECONDS segundos)" footer: builtWith: other: Creado con {{ .Generator }} + designedBy: other: Tema {{ .Theme }} diseñado por {{ .DesignedBy }} From 9c7e73646c8d97446add38b39e1aaa0ed8a4da74 Mon Sep 17 00:00:00 2001 From: zhixuan <59254886+zhixuan2333@users.noreply.github.com> Date: Fri, 27 Aug 2021 01:50:03 +0900 Subject: [PATCH 02/10] feat(article): add positional parameter for `video` shortcode (#331) --- layouts/shortcodes/video.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/layouts/shortcodes/video.html b/layouts/shortcodes/video.html index 733761a..5324754 100644 --- a/layouts/shortcodes/video.html +++ b/layouts/shortcodes/video.html @@ -1,13 +1,14 @@ +{{- $src := .Get "src" | default (.Get 0) -}}
From 9b75823f68f8f4f86ba65a295c636356828e7257 Mon Sep 17 00:00:00 2001 From: Matthias Thym Date: Mon, 30 Aug 2021 15:52:29 +0200 Subject: [PATCH 03/10] refactor(i18n): Suggest improvements English translation (#329) No need to shorten minutes Remove period from subtitle on 404 page --- i18n/en.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/i18n/en.yaml b/i18n/en.yaml index e279278..0197d89 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -30,15 +30,15 @@ article: other: Last updated on readingTime: - one: "{{ .Count }} min read" - ### Seems that there's no need to add 's' even if it's plural in English - other: "{{ .Count }} min read" + one: "{{ .Count }} minute read" + other: "{{ .Count }} minute read" notFound: title: other: Not Found + subtitle: - other: This page does not exist. + other: This page does not exist widget: archives: From 5bf8bdcde2232921d56bd8e474c307fa19748599 Mon Sep 17 00:00:00 2001 From: Jimmy Cai Date: Tue, 31 Aug 2021 11:08:36 +0200 Subject: [PATCH 04/10] chore: change demo site link --- theme.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/theme.toml b/theme.toml index e4c928e..2b9b841 100644 --- a/theme.toml +++ b/theme.toml @@ -6,7 +6,7 @@ license = "GPL-3.0-only" licenselink = "https://github.com/CaiJimmy/hugo-theme-stack/blob/master/LICENSE" description = "Card-style Hugo theme designed for bloggers" homepage = "https://github.com/CaiJimmy/hugo-theme-stack" -demosite = "https://theme-stack.jimmycai.com" +demosite = "https://demo.stack.jimmycai.com" tags = ["blog", "responsive", "clean", "light", "dark", "personal"] From 5693c4bf7a197936dcf8267409b23aef462df029 Mon Sep 17 00:00:00 2001 From: Jimmy Cai Date: Fri, 3 Sep 2021 19:05:10 +0200 Subject: [PATCH 05/10] doc: add `markup.goldmark.renderer.unsafe` option in `config.yaml` --- exampleSite/config.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 37e9f97..9c17e9d 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -176,6 +176,10 @@ related: weight: 200 markup: + goldmark: + renderer: + ## Set to true if you have HTML content inside Markdown + unsafe: false tableOfContents: endLevel: 4 ordered: true From 00c8616931ae16fa499bd07e3a93dd7f6028000f Mon Sep 17 00:00:00 2001 From: Christopher John Jackson Date: Fri, 17 Sep 2021 20:29:19 +0100 Subject: [PATCH 06/10] fix(article/comments): accept boolean `true` in `.Params.comments` (#352) --- layouts/_default/single.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 040b547..902fa98 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -17,7 +17,7 @@ {{ partial "article/components/related-contents" . }} - {{ if or (not (isset .Params "comments")) (eq .Params.comments "true")}} + {{ if not (eq .Params.comments false) }} {{ partial "comments/include" . }} {{ end }} @@ -54,4 +54,4 @@ {{ end }} -{{ end }} \ No newline at end of file +{{ end }} From 66bd8a299798b53c78fa4b6b65c5c7256485a029 Mon Sep 17 00:00:00 2001 From: Cookiekira <42908926+Cookiekira@users.noreply.github.com> Date: Sat, 18 Sep 2021 16:03:08 +0800 Subject: [PATCH 07/10] feat(comments): add Gitalk support (#351) --- exampleSite/config.yaml | 7 +++++ .../partials/comments/provider/gitalk.html | 30 +++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 layouts/partials/comments/provider/gitalk.html diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 9c17e9d..8139fa4 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -111,6 +111,13 @@ params: reactionsEnabled: 1 emitMetadata: 0 + gitalk: + owner: + admin: + repo: + clientID: + clientSecret: + widgets: enabled: - search diff --git a/layouts/partials/comments/provider/gitalk.html b/layouts/partials/comments/provider/gitalk.html new file mode 100644 index 0000000..95ca133 --- /dev/null +++ b/layouts/partials/comments/provider/gitalk.html @@ -0,0 +1,30 @@ +{{- with .Site.Params.comments.gitalk -}} +
+ + + + +{{ end }} From 7845f5dfe73b60e725182bc83fb7800d921e100b Mon Sep 17 00:00:00 2001 From: QIN2DIM <62018067+QIN2DIM@users.noreply.github.com> Date: Sat, 25 Sep 2021 02:22:58 +0800 Subject: [PATCH 08/10] feat(config): add `hasCJKLanguage` parameter (#360) --- exampleSite/config.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 8139fa4..7b89960 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -14,6 +14,10 @@ googleAnalytics: # Available values: en, fr, id, ja, ko, pt-br, zh-cn, es, de, nl, it DefaultContentLanguage: en +# Set hasCJKLanguage to true if DefaultContentLanguage is in [zh-cn ja ko] +# This will make .Summary and .WordCount behave correctly for CJK languages. +hasCJKLanguage: false + permalinks: post: /p/:slug/ page: /:slug/ From 57bfea833850e0565cf81d9a26c52359427151a2 Mon Sep 17 00:00:00 2001 From: zhixuan <59254886+zhixuan2333@users.noreply.github.com> Date: Sat, 25 Sep 2021 03:32:53 +0900 Subject: [PATCH 09/10] fix(shortcodes): mixed content error with bilibili and tencent video (#365) --- exampleSite/content/post/rich-content/index.md | 4 ++++ layouts/shortcodes/bilibili.html | 2 +- layouts/shortcodes/tencent.html | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/exampleSite/content/post/rich-content/index.md b/exampleSite/content/post/rich-content/index.md index 407c539..af8a390 100644 --- a/exampleSite/content/post/rich-content/index.md +++ b/exampleSite/content/post/rich-content/index.md @@ -32,3 +32,7 @@ Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-manageme ## Vimeo Simple Shortcode {{< vimeo_simple 48912912 >}} + +## bilibilibi Shortcode + +{{< bilibili av498363026 >}} diff --git a/layouts/shortcodes/bilibili.html b/layouts/shortcodes/bilibili.html index 602406c..cb72e43 100644 --- a/layouts/shortcodes/bilibili.html +++ b/layouts/shortcodes/bilibili.html @@ -13,7 +13,7 @@ {{ end }}
-