From 5693c4bf7a197936dcf8267409b23aef462df029 Mon Sep 17 00:00:00 2001 From: Jimmy Cai Date: Fri, 3 Sep 2021 19:05:10 +0200 Subject: [PATCH 01/79] 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 02/79] 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 03/79] 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 04/79] 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 05/79] 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 }}
-