From 37ca4b7640ba5c8b0e46e5beac4ab417b6f6b22d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Fri, 31 May 2024 15:11:24 +0100 Subject: [PATCH 01/14] v2.70.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2be67194..505471b1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hugo-blowfish-theme", - "version": "2.69.0", + "version": "2.70.0", "description": "Blowfish theme for Hugo", "scripts": { "postinstall": "vendor-copy", From 99d482e908416a7af85d28d394653aac03d49508 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Fri, 31 May 2024 15:35:59 +0100 Subject: [PATCH 02/14] ? --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 505471b1..b318803b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "hugo-blowfish-theme", "version": "2.70.0", - "description": "Blowfish theme for Hugo", + "description": "Blowfish theme for Hugo.", "scripts": { "postinstall": "vendor-copy", "assets": "rimraf assets/vendor && vendor-copy", From 26442558a71776c6a42cfe4de2cb2b17e03d2d23 Mon Sep 17 00:00:00 2001 From: Manjunath Mohan Date: Sat, 1 Jun 2024 12:04:55 +0530 Subject: [PATCH 03/14] list shortcode doc fixup --- exampleSite/content/docs/shortcodes/index.it.md | 4 ++-- exampleSite/content/docs/shortcodes/index.ja.md | 4 ++-- exampleSite/content/docs/shortcodes/index.md | 4 ++-- exampleSite/content/docs/shortcodes/index.zh-cn.md | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/exampleSite/content/docs/shortcodes/index.it.md b/exampleSite/content/docs/shortcodes/index.it.md index 14ab2b35..2222eb96 100644 --- a/exampleSite/content/docs/shortcodes/index.it.md +++ b/exampleSite/content/docs/shortcodes/index.it.md @@ -496,7 +496,7 @@ When life gives you lemons, make lemonade. | `value` | The value that will need to match the parameter defined in `where` for the query of articles e.g. for `where` == `Type` a valid value could be `sample` | {{< alert >}} -The `where` and `value` values are used in the following query `where .Site.RegularPages $where $value` in the code of the shortcode. Check [Hugo docs](https://gohugo.io/variables/page/) to learn more about which parameters are available to use. +The `where` and `value` values are used in the following query `where .Site.RegularPages $where $value` in the code of the shortcode. Check [Hugo docs](https://gohugo.io/methods/page/) to learn more about which parameters are available to use. {{}} @@ -512,7 +512,7 @@ The `where` and `value` values are used in the following query `where .Site.Regu **Example #2:** ```md -{{}} +{{}} ``` {{< list title="Samples" cardView=true limit=6 where="Type" value="sample">}} diff --git a/exampleSite/content/docs/shortcodes/index.ja.md b/exampleSite/content/docs/shortcodes/index.ja.md index 14ab2b35..2222eb96 100644 --- a/exampleSite/content/docs/shortcodes/index.ja.md +++ b/exampleSite/content/docs/shortcodes/index.ja.md @@ -496,7 +496,7 @@ When life gives you lemons, make lemonade. | `value` | The value that will need to match the parameter defined in `where` for the query of articles e.g. for `where` == `Type` a valid value could be `sample` | {{< alert >}} -The `where` and `value` values are used in the following query `where .Site.RegularPages $where $value` in the code of the shortcode. Check [Hugo docs](https://gohugo.io/variables/page/) to learn more about which parameters are available to use. +The `where` and `value` values are used in the following query `where .Site.RegularPages $where $value` in the code of the shortcode. Check [Hugo docs](https://gohugo.io/methods/page/) to learn more about which parameters are available to use. {{}} @@ -512,7 +512,7 @@ The `where` and `value` values are used in the following query `where .Site.Regu **Example #2:** ```md -{{}} +{{}} ``` {{< list title="Samples" cardView=true limit=6 where="Type" value="sample">}} diff --git a/exampleSite/content/docs/shortcodes/index.md b/exampleSite/content/docs/shortcodes/index.md index 14ab2b35..2222eb96 100644 --- a/exampleSite/content/docs/shortcodes/index.md +++ b/exampleSite/content/docs/shortcodes/index.md @@ -496,7 +496,7 @@ When life gives you lemons, make lemonade. | `value` | The value that will need to match the parameter defined in `where` for the query of articles e.g. for `where` == `Type` a valid value could be `sample` | {{< alert >}} -The `where` and `value` values are used in the following query `where .Site.RegularPages $where $value` in the code of the shortcode. Check [Hugo docs](https://gohugo.io/variables/page/) to learn more about which parameters are available to use. +The `where` and `value` values are used in the following query `where .Site.RegularPages $where $value` in the code of the shortcode. Check [Hugo docs](https://gohugo.io/methods/page/) to learn more about which parameters are available to use. {{}} @@ -512,7 +512,7 @@ The `where` and `value` values are used in the following query `where .Site.Regu **Example #2:** ```md -{{}} +{{}} ``` {{< list title="Samples" cardView=true limit=6 where="Type" value="sample">}} diff --git a/exampleSite/content/docs/shortcodes/index.zh-cn.md b/exampleSite/content/docs/shortcodes/index.zh-cn.md index 01ef4dec..c2ca4f11 100644 --- a/exampleSite/content/docs/shortcodes/index.zh-cn.md +++ b/exampleSite/content/docs/shortcodes/index.zh-cn.md @@ -497,7 +497,7 @@ When life gives you lemons, make lemonade. | `value` | 需要与 `where` 中定义的参数匹配的值,以进行文章查询,例如对于 `where` == `Type`,可以找到文章 `sample` | {{< alert >}} -`where` 和 `value` 值用于简码中进行以下格式的查询 `where .Site.RegularPages $where $value` 。检查 [Hugo 文档](https://gohugo.io/variables/page/) 以了解有关可用参数的更多信息。 +`where` 和 `value` 值用于简码中进行以下格式的查询 `where .Site.RegularPages $where $value` 。检查 [Hugo 文档](https://gohugo.io/methods/page/) 以了解有关可用参数的更多信息。 {{}} @@ -513,7 +513,7 @@ When life gives you lemons, make lemonade. **例 2:** ```md -{{}} +{{}} ``` {{< list title="Samples" cardView=true limit=6 where="Type" value="sample">}} From c54b7daff2713fbf1b78972ddda85bb15d6a745b Mon Sep 17 00:00:00 2001 From: wermos <63574588+wermos@users.noreply.github.com> Date: Sun, 2 Jun 2024 12:17:47 +0530 Subject: [PATCH 04/14] Updated the link shortcode. --- layouts/_default/_markup/render-link.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html index 83361695..9dad725a 100644 --- a/layouts/_default/_markup/render-link.html +++ b/layouts/_default/_markup/render-link.html @@ -1,2 +1 @@ - - {{ .Text | safeHTML }} \ No newline at end of file +{{ .Text | safeHTML }} \ No newline at end of file From 6d6885d99010a065f70452ed8c0838234baa1fba Mon Sep 17 00:00:00 2001 From: nunocoracao <3803196+nunocoracao@users.noreply.github.com> Date: Mon, 3 Jun 2024 06:05:16 +0000 Subject: [PATCH 05/14] Update Hugo supported version --- config.toml | 2 +- release-versions/hugo-latest.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config.toml b/config.toml index 04252d24..4a157531 100644 --- a/config.toml +++ b/config.toml @@ -2,4 +2,4 @@ [module.hugoVersion] extended = true min = "0.87.0" -max = "0.126.2" +max = "0.126.3" diff --git a/release-versions/hugo-latest.txt b/release-versions/hugo-latest.txt index 9ce944e7..928f13de 100644 --- a/release-versions/hugo-latest.txt +++ b/release-versions/hugo-latest.txt @@ -1 +1 @@ -v0.126.2 +v0.126.3 From 46737b193f3e8854a86a19f144a65807ff642871 Mon Sep 17 00:00:00 2001 From: wermos <63574588+wermos@users.noreply.github.com> Date: Mon, 3 Jun 2024 20:27:19 +0530 Subject: [PATCH 06/14] Tweaked the image shortcode. --- layouts/_default/_markup/render-image.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html index db9ebd2f..55001f32 100644 --- a/layouts/_default/_markup/render-image.html +++ b/layouts/_default/_markup/render-image.html @@ -16,7 +16,7 @@ {{ end }} {{ with $resource }}
- {{ if $disableImageOptimization }} + {{ if or $disableImageOptimization (eq .MediaType.SubType "svg") }} Date: Mon, 3 Jun 2024 20:39:10 +0530 Subject: [PATCH 07/14] Made the link shortcode more readable. --- layouts/_default/_markup/render-link.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html index 9dad725a..c5e9304a 100644 --- a/layouts/_default/_markup/render-link.html +++ b/layouts/_default/_markup/render-link.html @@ -1 +1,7 @@ -{{ .Text | safeHTML }} \ No newline at end of file + + {{- .Text | safeHTML -}} + \ No newline at end of file From de1cdd431c19528a80b0323e23fe8cfda52b3477 Mon Sep 17 00:00:00 2001 From: wermos <63574588+wermos@users.noreply.github.com> Date: Mon, 3 Jun 2024 20:50:15 +0530 Subject: [PATCH 08/14] Fixed an inconsistency. --- exampleSite/content/docs/shortcodes/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exampleSite/content/docs/shortcodes/index.md b/exampleSite/content/docs/shortcodes/index.md index 14ab2b35..b7ba4f5b 100644 --- a/exampleSite/content/docs/shortcodes/index.md +++ b/exampleSite/content/docs/shortcodes/index.md @@ -18,7 +18,7 @@ In addition to all the [default Hugo shortcodes](https://gohugo.io/content-manag | Parameter | Description | | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `icon` | **Optional.** the icon to display on the left side.
**Default:** `exclaimation triangle icon` (Check out the [icon shortcode](#icon) for more details on using icons.) | +| `icon` | **Optional.** the icon to display on the left side.
**Default:** `triangle-exclamation` (Check out the [icon shortcode](#icon) for more details on using icons.) | | `iconColor` | **Optional.** the color for the icon in basic CSS style.
Can be either hex values (`#FFFFFF`) or color names (`white`)
By default chosen based on the current color theme . | | `cardColor` | **Optional.** the color for the card background in basic CSS style.
Can be either hex values (`#FFFFFF`) or color names (`white`)
By default chosen based on the current color theme . | | `textColor` | **Optional.** the color for the text in basic CSS style.
Can be either hex values (`#FFFFFF`) or color names (`white`)
By default chosen based on the current color theme . | From bb435aded72566ff3c196614cdccec187034fdc3 Mon Sep 17 00:00:00 2001 From: wermos <63574588+wermos@users.noreply.github.com> Date: Mon, 3 Jun 2024 22:34:24 +0530 Subject: [PATCH 09/14] Minified the shortcodes and added handling for SVGs. --- layouts/_default/_markup/render-image.html | 38 +++++----- layouts/shortcodes/figure.html | 86 +++++++++++----------- 2 files changed, 62 insertions(+), 62 deletions(-) diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html index 55001f32..3e5fdce8 100644 --- a/layouts/_default/_markup/render-image.html +++ b/layouts/_default/_markup/render-image.html @@ -1,29 +1,29 @@ -{{ $disableImageOptimization := .Page.Site.Params.disableImageOptimization | default false }} -{{ $url := urls.Parse .Destination }} -{{ $altText := .Text }} -{{ $caption := .Title }} -{{ if findRE "^https?" $url.Scheme }} +{{- $disableImageOptimization := .Page.Site.Params.disableImageOptimization | default false }} +{{- $url := urls.Parse .Destination }} +{{- $altText := .Text }} +{{- $caption := .Title }} +{{- if findRE "^https?" $url.Scheme }}
{{ $altText }} {{ with $caption }}
{{ . | markdownify }}
{{ end }}
-{{ else }} - {{ $resource := "" }} - {{ if $.Page.Resources.GetMatch ($url.String) }} - {{ $resource = $.Page.Resources.GetMatch ($url.String) }} - {{ else if resources.GetMatch ($url.String) }} - {{ $resource = resources.Get ($url.String) }} - {{ end }} - {{ with $resource }} +{{- else }} + {{- $resource := "" }} + {{- if $.Page.Resources.GetMatch ($url.String) }} + {{- $resource = $.Page.Resources.GetMatch ($url.String) }} + {{- else if resources.GetMatch ($url.String) }} + {{- $resource = resources.Get ($url.String) }} + {{- end }} + {{- with $resource }}
- {{ if or $disableImageOptimization (eq .MediaType.SubType "svg") }} + {{- if or $disableImageOptimization (eq .MediaType.SubType "svg")}} {{ $altText }} - {{ else }} + {{- else }} {{ $altText }} - {{ end }} + {{- end }} {{ with $caption }}
{{ . | markdownify }}
{{ end }}
- {{ else }} + {{- else }}
{{ $altText }} {{ with $caption }}
{{ . | markdownify }}
{{ end }}
- {{ end }} -{{ end }} + {{- end }} +{{- end }} diff --git a/layouts/shortcodes/figure.html b/layouts/shortcodes/figure.html index cd881a31..2d951d63 100644 --- a/layouts/shortcodes/figure.html +++ b/layouts/shortcodes/figure.html @@ -2,49 +2,49 @@ {{ if .Get "default" }} {{ template "_internal/shortcodes/figure.html" . }} {{ else }} - {{ $url := urls.Parse (.Get "src") }} - {{ $altText := .Get "alt" }} - {{ $caption := .Get "caption" }} - {{ $href := .Get "href" }} - {{ $class := .Get "class" }} - {{ $target := .Get "target" | default "_blank" }} - {{ $nozoom := .Get "nozoom" | default false }} + {{- $url := urls.Parse (.Get "src") }} + {{- $altText := .Get "alt" }} + {{- $caption := .Get "caption" }} + {{- $href := .Get "href" }} + {{- $class := .Get "class" }} + {{- $target := .Get "target" | default "_blank" }} + {{- $nozoom := .Get "nozoom" | default false -}}
- {{ with $href }}{{ end }} - {{ if findRE "^https?" $url.Scheme }} - {{ $altText }} - {{ else }} - {{ $resource := "" }} - {{ if $.Page.Resources.GetMatch ($url.String) }} - {{ $resource = $.Page.Resources.GetMatch ($url.String) }} - {{ else if resources.GetMatch ($url.String) }} - {{ $resource = resources.Get ($url.String) }} - {{ end }} - {{ with $resource }} - {{ if $disableImageOptimization }} - {{ $altText }} - {{ else }} - {{ $altText }} - {{ end }} - {{ else }} - {{ $altText }} - {{ end }} - {{ end }} - {{ with $caption }}
{{ . | markdownify }}
{{ end }} - {{ if $href }}
{{ end }} + {{- with $href }}{{ end -}} + {{- if findRE "^https?" $url.Scheme }} + {{ $altText }} + {{- else }} + {{- $resource := "" }} + {{- if $.Page.Resources.GetMatch ($url.String) }} + {{- $resource = $.Page.Resources.GetMatch ($url.String) }} + {{- else if resources.GetMatch ($url.String) }} + {{- $resource = resources.Get ($url.String) }} + {{- end }} + {{- with $resource }} + {{- if or $disableImageOptimization (eq .MediaType.SubType "svg")}} + {{ $altText }} + {{- else }} + {{ $altText }} + {{- end }} + {{- else }} + {{ $altText }} + {{- end }} + {{- end }} + {{- with $caption }}
{{ . | markdownify }}
{{ end }} + {{- if $href }}
{{ end }}
-{{ end }} +{{- end -}} From 581aba335914034a137892257ba9bbf798d700b1 Mon Sep 17 00:00:00 2001 From: wermos <63574588+wermos@users.noreply.github.com> Date: Mon, 3 Jun 2024 22:45:22 +0530 Subject: [PATCH 10/14] Be less aggressive in removing newlines. --- layouts/_default/_markup/render-link.html | 2 +- layouts/shortcodes/figure.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html index c5e9304a..b6028bf5 100644 --- a/layouts/_default/_markup/render-link.html +++ b/layouts/_default/_markup/render-link.html @@ -2,6 +2,6 @@ {{- with .Title -}} title="{{ . }}" {{- end }} - {{- if or (strings.HasPrefix .Destination "http:") (strings.HasPrefix .Destination "https:") }} target="_blank"{{ end -}}> + {{- if or (strings.HasPrefix .Destination "http:") (strings.HasPrefix .Destination "https:") }} target="_blank"{{ end }}> {{- .Text | safeHTML -}} \ No newline at end of file diff --git a/layouts/shortcodes/figure.html b/layouts/shortcodes/figure.html index 2d951d63..fb7293c8 100644 --- a/layouts/shortcodes/figure.html +++ b/layouts/shortcodes/figure.html @@ -44,7 +44,7 @@ {{ $altText }} {{- end }} {{- end }} - {{- with $caption }}
{{ . | markdownify }}
{{ end }} - {{- if $href }}{{ end }} + {{ with $caption }}
{{ . | markdownify }}
{{ end }} + {{ if $href }}{{ end }}
{{- end -}} From f88923b3ff7aae18fb4656032d656d2cc955792f Mon Sep 17 00:00:00 2001 From: wermos <63574588+wermos@users.noreply.github.com> Date: Mon, 3 Jun 2024 23:54:49 +0530 Subject: [PATCH 11/14] Fixed the issue of the numbers showing up. --- layouts/shortcodes/timeline.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/shortcodes/timeline.html b/layouts/shortcodes/timeline.html index efaf922c..c97673d1 100644 --- a/layouts/shortcodes/timeline.html +++ b/layouts/shortcodes/timeline.html @@ -1,3 +1,3 @@ -
    +
      {{- .Inner -}}
    \ No newline at end of file From 576fee1d7dd687504c57ba2f3b2d57951cc24409 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Mon, 3 Jun 2024 23:19:14 +0100 Subject: [PATCH 12/14] fix https://github.com/nunocoracao/blowfish/issues/1510 --- layouts/partials/footer.html | 2 +- package-lock.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index b5c1d919..d31cecd1 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -27,7 +27,7 @@ {{ if .Site.Params.footer.showCopyright | default true }}

    {{- with replace .Site.Params.copyright "{ year }" now.Year }} - {{ . | emojify }} + {{ . | markdownify }} {{- else }} © {{ now.Format "2006" }} diff --git a/package-lock.json b/package-lock.json index edf1491e..bf194df9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "hugo-blowfish-theme", - "version": "2.69.0", + "version": "2.70.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "hugo-blowfish-theme", - "version": "2.69.0", + "version": "2.70.0", "hasInstallScript": true, "license": "MIT", "dependencies": { From 87b4ed88c6e1506d6f0d6b7301b43f47365767d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Mon, 3 Jun 2024 23:23:17 +0100 Subject: [PATCH 13/14] final polish --- exampleSite/config/_default/params.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml index 2831a098..2a5556d6 100644 --- a/exampleSite/config/_default/params.toml +++ b/exampleSite/config/_default/params.toml @@ -100,8 +100,8 @@ smartTOCHideUnfocusedChildren = false showHero = true heroStyle = "background" # valid options: basic, big, background, thumbAndBackground showBreadcrumbs = false - showViews = true - showLikes = true + showViews = false + showLikes = false showTableOfContents = true cardView = false From de5911650f6b536b45101aeaeb8ca404b89cb997 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Mon, 3 Jun 2024 23:23:51 +0100 Subject: [PATCH 14/14] final polish --- exampleSite/config/_default/params.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml index 2a5556d6..325917e7 100644 --- a/exampleSite/config/_default/params.toml +++ b/exampleSite/config/_default/params.toml @@ -109,8 +109,8 @@ smartTOCHideUnfocusedChildren = false showHero = true heroStyle = "background" # valid options: basic, big, background, thumbAndBackground showBreadcrumbs = false - showViews = true - showLikes = true + showViews = false + showLikes = false showTableOfContents = true groupByYear = false cardView = true