From 533e7c5015e024c0d9782624ad250c9c144a975d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Tue, 27 May 2025 01:04:48 +0100 Subject: [PATCH 01/17] new version seed --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7010a1dc..c07c4f7e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hugo-blowfish-theme", - "version": "2.86.0", + "version": "2.87.0", "description": "Blowfish theme for Hugo.", "scripts": { "postinstall": "vendor-copy", From 87138e8ee09fe5115da829bb5ca50065e4ee0257 Mon Sep 17 00:00:00 2001 From: Tim Cappalli Date: Tue, 27 May 2025 10:11:48 +0300 Subject: [PATCH 02/17] add showCategoryOnly --- exampleSite/content/docs/configuration/index.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/exampleSite/content/docs/configuration/index.md b/exampleSite/content/docs/configuration/index.md index 2e7a5973..3e699659 100644 --- a/exampleSite/content/docs/configuration/index.md +++ b/exampleSite/content/docs/configuration/index.md @@ -252,7 +252,8 @@ Many of the article defaults here can be overridden on a per article basis by sp | `article.showTableOfContents` | `false` | Whether or not the table of contents is displayed on articles. | | `article.showRelatedContent` | `false` | Display related content for each post. Might required additional configuration to your `config.toml`. Please check the theme `config.toml` if you want to enable this feature and copy all the relevant _related_ entries. Also check [Hugo's docs](https://gohugo.io/content-management/related/) on related content. | | `article.relatedContentLimit` | `3` | Limit of related articles to display if `showRelatedContent` is turned on. | -| `article.showTaxonomies` | `false` | Whether or not the taxonomies related to this article are displayed. | +| `article.showTaxonomies` | `false` | Whether or not all the taxonomies related to this article are displayed. | +| `article.showCategoryOnly` | `false` | Whether or not the "category" taxonomy is displayed. `showTaxonomies` should be `false` when this param is used, otherwise duplicates will appear. | | `article.showAuthorsBadges` | `false` | Whether the `authors` taxonomies are are displayed in the article or list header. This requires the setup of `multiple authors` and the `authors` taxonomy. Check [this page]({{< ref "multi-author" >}}) for more details on how to configure that feature. | | `article.showWordCount` | `false` | Whether or not article word counts are displayed. | | `article.showComments` | `false` | Whether or not the [comments partial]({{< ref "partials#comments" >}}) is included after the article footer. | From fb2c7b88e2fcba6a504cfcfa137f990e7ad3c8b3 Mon Sep 17 00:00:00 2001 From: ZhenShuo Leo <98386542+ZhenShuo2021@users.noreply.github.com> Date: Wed, 28 May 2025 01:12:23 +0800 Subject: [PATCH 03/17] chore: adjust develope command --- CONTRIBUTING.md | 2 +- exampleSite/config/_default/hugo.toml | 14 +++++++++++--- lighthouserc.js | 2 +- package.json | 6 +++--- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 804668a2..87d2b870 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,7 +12,7 @@ - Great! Open a new GitHub pull request with the patch. - All development occurs on the `dev` branch and new PRs should be forked from here. -- The command `npm run example` can be used to test local changes using the example site. +- The command `npm run example:production` can be used to test local changes using the example site. - Ensure the PR description clearly describes the problem and solution. Include the relevant issue number, if applicable. - **Before submitting**, check the [coding conventions](#coding-conventions) section below to learn more about coding and commit message expectations. diff --git a/exampleSite/config/_default/hugo.toml b/exampleSite/config/_default/hugo.toml index dcbc6bf9..d03b41f7 100644 --- a/exampleSite/config/_default/hugo.toml +++ b/exampleSite/config/_default/hugo.toml @@ -70,11 +70,19 @@ googleAnalytics = "G-PEDMYR1V0K" type = 'fragments' weight = 10 -# Render only specific parts of the site for faster development. Use: hugo --renderSegments site_core +# Render only specific parts of the site for faster development. +# Note that there are more files are ignored in development/hugo.toml +# +# Usage: `hugo --renderSegments core` or `hugo --renderSegments core,en_only` [segments] - [segments.site_core] - [[segments.site_core.includes]] + [segments.core] + [[segments.core.includes]] + # Debug core pages path = '{/,/docs,/docs/**,/samples,/samples/**}' [segments.en_only] [[segments.en_only.includes]] + # Alternatively, you can use environment variable + # - UNIX: HUGO_DISABLELANGUAGES='it ja zh-cn' npm run example:core + # - Windows CMD: set "HUGO_DISABLELANGUAGES=it ja zh-cn" && npm run example:core + # - Windows PowerShell: $env:HUGO_DISABLELANGUAGES="it ja zh-cn"; npm run example:core lang = 'en' diff --git a/lighthouserc.js b/lighthouserc.js index 1ea89031..3c9dbb1b 100644 --- a/lighthouserc.js +++ b/lighthouserc.js @@ -1,7 +1,7 @@ module.exports = { ci: { collect: { - startServerCommand: "npm run example -- --disableLiveReload --minify", + startServerCommand: "npm run example:production -- --disableLiveReload --minify", startServerReadyPattern: "Web Server is available", url: ["http://localhost:8008/blowfish/samples/emoji/"], settings: { diff --git a/package.json b/package.json index 7010a1dc..6950e958 100644 --- a/package.json +++ b/package.json @@ -10,9 +10,9 @@ "dev-windows": "set NODE_ENV=development&& npx @tailwindcss/cli -i ./assets/css/main.css -o ./assets/css/compiled/main.css --jit -w", "build-windows": "set NODE_ENV=production&& npx @tailwindcss/cli -i ./assets/css/main.css -o ./assets/css/compiled/main.css --jit", "build-hugo": "hugo --minify -s exampleSite --themesDir ../.. -d ../docs --baseURL https://nunocoracao.github.io/blowfish/", - "example": "hugo server -E -F --minify --source exampleSite --themesDir ../.. --buildDrafts -b http://localhost/ -p 1313 -e production", - "example:site_core": "hugo server -E -F --minify --source exampleSite --themesDir ../.. --buildDrafts -b http://localhost/ -p 1313 --renderSegments site_core", - "example:site_core:en_only": "hugo server -E -F --minify --source exampleSite --themesDir ../.. --buildDrafts -b http://localhost/ -p 1313 --renderSegments site_core,en_only", + "example:dev": "hugo server -E -F --minify --source exampleSite --themesDir ../.. --buildDrafts -b http://localhost/ -p 1313", + "example:dev:core": "hugo server -E -F --minify --source exampleSite --themesDir ../.. --buildDrafts -b http://localhost/ -p 1313 --renderSegments core", + "example:production": "hugo server -E -F --minify --source exampleSite --themesDir ../.. --buildDrafts -b http://localhost/ -p 1313 -e production", "lighthouse": "lhci autorun" }, "repository": { From 6be21955d54579b2d5e7ef232568c9bdd3693536 Mon Sep 17 00:00:00 2001 From: ZhenShuo Leo <98386542+ZhenShuo2021@users.noreply.github.com> Date: Wed, 28 May 2025 04:48:19 +0800 Subject: [PATCH 04/17] docs: add uncached head --- exampleSite/content/docs/partials/index.it.md | 8 ++++++++ exampleSite/content/docs/partials/index.ja.md | 8 ++++++++ exampleSite/content/docs/partials/index.md | 8 ++++++++ exampleSite/content/docs/partials/index.zh-cn.md | 8 ++++++++ 4 files changed, 32 insertions(+) diff --git a/exampleSite/content/docs/partials/index.it.md b/exampleSite/content/docs/partials/index.it.md index 13225e0d..c522aaba 100644 --- a/exampleSite/content/docs/partials/index.it.md +++ b/exampleSite/content/docs/partials/index.it.md @@ -137,3 +137,11 @@ If you wish to insert additional code after article links, create a `layouts/par The theme allows for inserting additional code directly into the `` and `