From 51e0ec7f99c659c5730e79f313ff79a07d8aff78 Mon Sep 17 00:00:00 2001 From: Rich Date: Sat, 12 Aug 2023 10:29:56 +0100 Subject: [PATCH 01/15] feat: allow footer copyright to be different to the site title (#839) * Allow copyright to be different to the site title * Add copyright to exampleSite --- exampleSite/config.yaml | 1 + layouts/partials/footer/footer.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index c1b48dd..78354f2 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -3,6 +3,7 @@ languageCode: en-us theme: hugo-theme-stack paginate: 5 title: Example Site +copyright: Example Person languages: en: diff --git a/layouts/partials/footer/footer.html b/layouts/partials/footer/footer.html index c8d30cb..a677482 100644 --- a/layouts/partials/footer/footer.html +++ b/layouts/partials/footer/footer.html @@ -5,7 +5,7 @@ {{ if and (.Site.Params.footer.since) (ne .Site.Params.footer.since (int (now.Format "2006"))) }} {{ .Site.Params.footer.since }} - {{ end }} - {{ now.Format "2006" }} {{ .Site.Title }} + {{ now.Format "2006" }} {{ default .Site.Title .Site.Copyright }}
From 26d2859f7040670bf5aba1e0aa4be6ed51f8cba7 Mon Sep 17 00:00:00 2001 From: Mehedi Hasan <0xmehedi@tutanota.com> Date: Sat, 12 Aug 2023 15:57:02 +0600 Subject: [PATCH 02/15] fix: very poor color contrast for default text (#845) Resolves #754 Co-authored-by: Nick Kocharhook --- assets/scss/variables.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/scss/variables.scss b/assets/scss/variables.scss index afddb80..47b7978 100644 --- a/assets/scss/variables.scss +++ b/assets/scss/variables.scss @@ -16,7 +16,7 @@ $defaultTagColors: #fff, #fff, #fff, #fff, #fff; --accent-color: #34495e; --accent-color-darker: #2c3e50; --accent-color-text: #fff; - --body-text-color: #bababa; + --body-text-color: #707070; --tag-border-radius: 4px; @@ -56,7 +56,7 @@ $defaultTagColors: #fff, #fff, #fff, #fff, #fff; --card-text-color-main: #000; --card-text-color-secondary: #747474; - --card-text-color-tertiary: #bababa; + --card-text-color-tertiary: #767676; --card-separator-color: rgba(218, 218, 218, 0.5); --card-border-radius: 10px; From cabaf06ef2716885fd751ef191018c9da48ecbf9 Mon Sep 17 00:00:00 2001 From: Jimmy Cai Date: Sat, 12 Aug 2023 12:20:19 +0200 Subject: [PATCH 03/15] fix: custom params on the language top level is deprecated (#857) * fix: custom params on the language top level is deprecated New with Hugo 0.112.0 closes #853 * ci: upgrade Netlify CI Hugo version to 0.117.0 --- exampleSite/config.yaml | 9 ++++++--- netlify.toml | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 78354f2..80f3bf0 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -9,19 +9,22 @@ languages: en: languageName: English title: Example Site - description: Example description weight: 1 + params: + description: Example description zh-cn: languageName: 中文 title: 演示站点 - description: 演示说明 weight: 2 + params: + description: 演示说明 ar: languageName: عربي languagedirection: rtl title: موقع تجريبي - description: وصف تجريبي weight: 3 + params: + description: وصف تجريبي # Change it to your Disqus shortname before using disqusShortname: hugo-theme-stack diff --git a/netlify.toml b/netlify.toml index 90a0360..229f970 100644 --- a/netlify.toml +++ b/netlify.toml @@ -2,7 +2,7 @@ publish = "exampleSite/public" [build.environment] - HUGO_VERSION = "0.100.2" + HUGO_VERSION = "0.117.0" HUGO_THEME = "repo" [context.production] From f7e442cabb7475ae9c8a327efa1441694d1883c1 Mon Sep 17 00:00:00 2001 From: Jimmy Cai Date: Sat, 12 Aug 2023 13:03:45 +0200 Subject: [PATCH 04/15] fix(search): reset `lastSearch` variable if keywords are empty (#858) closes https://github.com/CaiJimmy/hugo-theme-stack/issues/832 --- assets/ts/search.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/assets/ts/search.tsx b/assets/ts/search.tsx index 68db7b3..856b48d 100644 --- a/assets/ts/search.tsx +++ b/assets/ts/search.tsx @@ -227,6 +227,7 @@ class Search { Search.updateQueryString(keywords, true); if (keywords === '') { + lastSearch = ''; return this.clear(); } From 1668ebc3e4004ffcd06f62fe13253a6b25e4351b Mon Sep 17 00:00:00 2001 From: Jimmy Cai Date: Tue, 15 Aug 2023 11:40:43 +0200 Subject: [PATCH 05/15] feat: use `.RelPermalink` for search JSON (#859) Avoids CORS problem when the user inputs `baseurl` incorrectly. --- layouts/page/search.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/page/search.html b/layouts/page/search.html index 7c424a6..fbfb74d 100644 --- a/layouts/page/search.html +++ b/layouts/page/search.html @@ -1,11 +1,11 @@ {{ define "body-class" }}template-search{{ end }} {{ define "head" }} {{- with .OutputFormats.Get "json" -}} - + {{- end -}} {{ end }} {{ define "main" }} -
+

From eefa68666171e3fcf413a00b1e91aebe8e9874e5 Mon Sep 17 00:00:00 2001 From: Jimmy Cai Date: Tue, 15 Aug 2023 11:47:48 +0200 Subject: [PATCH 06/15] fix: add `word-break: break-word;` to `` and `` (#860) closes https://github.com/CaiJimmy/hugo-theme-stack/issues/746 --- assets/scss/partials/layout/article.scss | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/assets/scss/partials/layout/article.scss b/assets/scss/partials/layout/article.scss index 97c7e77..e030b4d 100644 --- a/assets/scss/partials/layout/article.scss +++ b/assets/scss/partials/layout/article.scss @@ -264,6 +264,11 @@ font-family: var(--code-font-family); } + a, + code { + word-break: break-word; + } + .gallery { position: relative; display: flex; From 4e2e90da4c8a03c0bde2baba2e92c12209cdd3ca Mon Sep 17 00:00:00 2001 From: Jimmy Cai Date: Tue, 15 Aug 2023 12:46:29 +0200 Subject: [PATCH 07/15] fix: page translation links overflow (#861) closes https://github.com/CaiJimmy/hugo-theme-stack/issues/788 --- assets/scss/partials/article.scss | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/assets/scss/partials/article.scss b/assets/scss/partials/article.scss index f085ff0..2c3a7af 100644 --- a/assets/scss/partials/article.scss +++ b/assets/scss/partials/article.scss @@ -92,16 +92,15 @@ .article-time, .article-translations { display: flex; - align-items: center; color: var(--card-text-color-tertiary); gap: 15px; - flex-wrap: wrap; svg { vertical-align: middle; width: 20px; height: 20px; stroke-width: 1.33; + flex-shrink: 0; } time, @@ -117,6 +116,16 @@ } } +.article-time { + flex-wrap: wrap; +} + +.article-translations { + & > div { + flex-wrap: wrap; + } +} + .article-category, .article-tags { display: flex; From 41c3033d1ac6b9596ce3ae861484e855b619705a Mon Sep 17 00:00:00 2001 From: Jimmy Cai Date: Tue, 15 Aug 2023 13:15:32 +0200 Subject: [PATCH 08/15] feat(article): add style to `` tag (#862) * fix: set `unsafe` to true for exampleSite To display `` tag correctly * feat(article): add style to `kbd` tag * feat: improve `` style --- assets/scss/partials/layout/article.scss | 10 ++++++++++ assets/scss/variables.scss | 2 ++ exampleSite/config.yaml | 2 +- exampleSite/content/post/markdown-syntax/index.md | 2 +- 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/assets/scss/partials/layout/article.scss b/assets/scss/partials/layout/article.scss index e030b4d..73757e4 100644 --- a/assets/scss/partials/layout/article.scss +++ b/assets/scss/partials/layout/article.scss @@ -423,4 +423,14 @@ overflow-x: auto; overflow-y: hidden; } + + kbd { + border: 1px solid var(--kbd-border-color); + font-weight: bold; + font-size: 0.9em; + line-height: 1; + padding: 2px 4px; + border-radius: 4px; + display: inline-block; + } } diff --git a/assets/scss/variables.scss b/assets/scss/variables.scss index 47b7978..6709f0c 100644 --- a/assets/scss/variables.scss +++ b/assets/scss/variables.scss @@ -123,6 +123,8 @@ $defaultTagColors: #fff, #fff, #fff, #fff, #fff; --table-border-color: #dadada; --tr-even-background-color: #efefee; + --kbd-border-color: #dadada; + &[data-scheme="dark"] { --code-background-color: #272822; --code-text-color: rgba(255, 255, 255, 0.9); diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 80f3bf0..b723dea 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -228,7 +228,7 @@ markup: goldmark: renderer: ## Set to true if you have HTML content inside Markdown - unsafe: false + unsafe: true tableOfContents: endLevel: 4 ordered: true diff --git a/exampleSite/content/post/markdown-syntax/index.md b/exampleSite/content/post/markdown-syntax/index.md index 0254cca..c584c4c 100644 --- a/exampleSite/content/post/markdown-syntax/index.md +++ b/exampleSite/content/post/markdown-syntax/index.md @@ -159,7 +159,7 @@ H2O Xn + Yn = Zn -Press CTRL+ALT+Delete to end the session. +Press CTRL + ALT + Delete to end the session. Most salamanders are nocturnal, and hunt for insects, worms, and other small creatures. From 5edd4afaf383d659d37e2ff8131cb4273c04e62e Mon Sep 17 00:00:00 2001 From: Jimmy Cai Date: Tue, 15 Aug 2023 13:17:22 +0200 Subject: [PATCH 09/15] release: 3.18.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 a677482..45bed2c 100644 --- a/layouts/partials/footer/footer.html +++ b/layouts/partials/footer/footer.html @@ -1,4 +1,4 @@ -{{- $ThemeVersion := "3.17.0" -}} +{{- $ThemeVersion := "3.18.0" -}}