Compare commits

...

20 Commits

Author SHA1 Message Date
Nuno Coração 0a91156191 Merge pull request #1506 from nunocoracao/dev
🔖 v2.70.0
2024-06-03 23:29:33 +01:00
Nuno Coração de5911650f final polish 2024-06-03 23:23:51 +01:00
Nuno Coração 87b4ed88c6 final polish 2024-06-03 23:23:17 +01:00
Nuno Coração cc9ee9d26f Merge pull request #1513 from wermos/minor-improvements
🎨 Improvements to image handling and link handling
2024-06-03 23:21:24 +01:00
Nuno Coração 1a5e1728d0 Merge pull request #1511 from nunocoracao/hugo-new-version
⚙️ Update Hugo supported version
2024-06-03 23:20:57 +01:00
Nuno Coração 0033750d1b Merge pull request #1516 from nunocoracao/1510-copyright-in-footer-no-longer-accepts-markdown
🐛 fix copyright in footer no longer accepts markdown
2024-06-03 23:20:17 +01:00
Nuno Coração 576fee1d7d fix https://github.com/nunocoracao/blowfish/issues/1510 2024-06-03 23:19:14 +01:00
Nuno Coração 9bcab20864 Merge pull request #1508 from mnjm/list-doc-fixup
list shortcode doc fix
2024-06-03 23:13:36 +01:00
Nuno Coração 9640f0cb7d Merge pull request #1515 from wermos/fix-timeline
🐛 Prevent numbers from showing up in timelines
2024-06-03 23:03:07 +01:00
wermos f88923b3ff Fixed the issue of the numbers showing up. 2024-06-03 23:54:49 +05:30
wermos 581aba3359 Be less aggressive in removing newlines. 2024-06-03 22:45:22 +05:30
wermos bb435aded7 Minified the shortcodes and added handling for SVGs. 2024-06-03 22:34:24 +05:30
wermos de1cdd431c Fixed an inconsistency. 2024-06-03 20:50:15 +05:30
wermos c6cffadfa1 Made the link shortcode more readable. 2024-06-03 20:39:10 +05:30
wermos 46737b193f Tweaked the image shortcode. 2024-06-03 20:27:19 +05:30
nunocoracao 6d6885d990 Update Hugo supported version 2024-06-03 06:05:16 +00:00
wermos c54b7daff2 Updated the link shortcode. 2024-06-02 12:20:45 +05:30
Manjunath Mohan 26442558a7 list shortcode doc fixup 2024-06-01 12:21:17 +05:30
Nuno Coração 99d482e908 ? 2024-05-31 15:35:59 +01:00
Nuno Coração 37ca4b7640 v2.70.0 2024-05-31 15:11:24 +01:00
14 changed files with 88 additions and 83 deletions
+1 -1
View File
@@ -2,4 +2,4 @@
[module.hugoVersion] [module.hugoVersion]
extended = true extended = true
min = "0.87.0" min = "0.87.0"
max = "0.126.2" max = "0.126.3"
+4 -4
View File
@@ -100,8 +100,8 @@ smartTOCHideUnfocusedChildren = false
showHero = true showHero = true
heroStyle = "background" # valid options: basic, big, background, thumbAndBackground heroStyle = "background" # valid options: basic, big, background, thumbAndBackground
showBreadcrumbs = false showBreadcrumbs = false
showViews = true showViews = false
showLikes = true showLikes = false
showTableOfContents = true showTableOfContents = true
cardView = false cardView = false
@@ -109,8 +109,8 @@ smartTOCHideUnfocusedChildren = false
showHero = true showHero = true
heroStyle = "background" # valid options: basic, big, background, thumbAndBackground heroStyle = "background" # valid options: basic, big, background, thumbAndBackground
showBreadcrumbs = false showBreadcrumbs = false
showViews = true showViews = false
showLikes = true showLikes = false
showTableOfContents = true showTableOfContents = true
groupByYear = false groupByYear = false
cardView = true cardView = true
@@ -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` | | `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 >}} {{< 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.
{{</ alert >}} {{</ alert >}}
<!-- prettier-ignore-end --> <!-- prettier-ignore-end -->
@@ -512,7 +512,7 @@ The `where` and `value` values are used in the following query `where .Site.Regu
**Example #2:** **Example #2:**
```md ```md
{{</* list title="Samples" cardView=true limit=5 where="Type" value="sample" */>}} {{</* list title="Samples" cardView=true limit=6 where="Type" value="sample" */>}}
``` ```
{{< list title="Samples" cardView=true limit=6 where="Type" value="sample">}} {{< list title="Samples" cardView=true limit=6 where="Type" value="sample">}}
@@ -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` | | `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 >}} {{< 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.
{{</ alert >}} {{</ alert >}}
<!-- prettier-ignore-end --> <!-- prettier-ignore-end -->
@@ -512,7 +512,7 @@ The `where` and `value` values are used in the following query `where .Site.Regu
**Example #2:** **Example #2:**
```md ```md
{{</* list title="Samples" cardView=true limit=5 where="Type" value="sample" */>}} {{</* list title="Samples" cardView=true limit=6 where="Type" value="sample" */>}}
``` ```
{{< list title="Samples" cardView=true limit=6 where="Type" value="sample">}} {{< list title="Samples" cardView=true limit=6 where="Type" value="sample">}}
+3 -3
View File
@@ -18,7 +18,7 @@ In addition to all the [default Hugo shortcodes](https://gohugo.io/content-manag
<!-- prettier-ignore-start --> <!-- prettier-ignore-start -->
| Parameter | Description | | Parameter | Description |
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `icon` | **Optional.** the icon to display on the left side.<br>**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.<br>**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.<br>Can be either hex values (`#FFFFFF`) or color names (`white`)<br>By default chosen based on the current color theme . | | `iconColor` | **Optional.** the color for the icon in basic CSS style.<br>Can be either hex values (`#FFFFFF`) or color names (`white`)<br>By default chosen based on the current color theme . |
| `cardColor` | **Optional.** the color for the card background in basic CSS style.<br>Can be either hex values (`#FFFFFF`) or color names (`white`)<br>By default chosen based on the current color theme . | | `cardColor` | **Optional.** the color for the card background in basic CSS style.<br>Can be either hex values (`#FFFFFF`) or color names (`white`)<br>By default chosen based on the current color theme . |
| `textColor` | **Optional.** the color for the text in basic CSS style.<br>Can be either hex values (`#FFFFFF`) or color names (`white`)<br>By default chosen based on the current color theme . | | `textColor` | **Optional.** the color for the text in basic CSS style.<br>Can be either hex values (`#FFFFFF`) or color names (`white`)<br>By default chosen based on the current color theme . |
@@ -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` | | `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 >}} {{< 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.
{{</ alert >}} {{</ alert >}}
<!-- prettier-ignore-end --> <!-- prettier-ignore-end -->
@@ -512,7 +512,7 @@ The `where` and `value` values are used in the following query `where .Site.Regu
**Example #2:** **Example #2:**
```md ```md
{{</* list title="Samples" cardView=true limit=5 where="Type" value="sample" */>}} {{</* list title="Samples" cardView=true limit=6 where="Type" value="sample" */>}}
``` ```
{{< list title="Samples" cardView=true limit=6 where="Type" value="sample">}} {{< list title="Samples" cardView=true limit=6 where="Type" value="sample">}}
@@ -497,7 +497,7 @@ When life gives you lemons, make lemonade.
| `value` | 需要与 `where` 中定义的参数匹配的值,以进行文章查询,例如对于 `where` == `Type`,可以找到文章 `sample` | | `value` | 需要与 `where` 中定义的参数匹配的值,以进行文章查询,例如对于 `where` == `Type`,可以找到文章 `sample` |
{{< alert >}} {{< 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/) 以了解有关可用参数的更多信息。
{{</ alert >}} {{</ alert >}}
<!-- prettier-ignore-end --> <!-- prettier-ignore-end -->
@@ -513,7 +513,7 @@ When life gives you lemons, make lemonade.
**例 2:** **例 2:**
```md ```md
{{</* list title="Samples" cardView=true limit=5 where="Type" value="sample" */>}} {{</* list title="Samples" cardView=true limit=6 where="Type" value="sample" */>}}
``` ```
{{< list title="Samples" cardView=true limit=6 where="Type" value="sample">}} {{< list title="Samples" cardView=true limit=6 where="Type" value="sample">}}
+19 -19
View File
@@ -1,29 +1,29 @@
{{ $disableImageOptimization := .Page.Site.Params.disableImageOptimization | default false }} {{- $disableImageOptimization := .Page.Site.Params.disableImageOptimization | default false }}
{{ $url := urls.Parse .Destination }} {{- $url := urls.Parse .Destination }}
{{ $altText := .Text }} {{- $altText := .Text }}
{{ $caption := .Title }} {{- $caption := .Title }}
{{ if findRE "^https?" $url.Scheme }} {{- if findRE "^https?" $url.Scheme }}
<figure> <figure>
<img class="my-0 rounded-md" loading="lazy" src="{{ $url.String }}" alt="{{ $altText }}" /> <img class="my-0 rounded-md" loading="lazy" src="{{ $url.String }}" alt="{{ $altText }}" />
{{ with $caption }}<figcaption>{{ . | markdownify }}</figcaption>{{ end }} {{ with $caption }}<figcaption>{{ . | markdownify }}</figcaption>{{ end }}
</figure> </figure>
{{ else }} {{- else }}
{{ $resource := "" }} {{- $resource := "" }}
{{ if $.Page.Resources.GetMatch ($url.String) }} {{- if $.Page.Resources.GetMatch ($url.String) }}
{{ $resource = $.Page.Resources.GetMatch ($url.String) }} {{- $resource = $.Page.Resources.GetMatch ($url.String) }}
{{ else if resources.GetMatch ($url.String) }} {{- else if resources.GetMatch ($url.String) }}
{{ $resource = resources.Get ($url.String) }} {{- $resource = resources.Get ($url.String) }}
{{ end }} {{- end }}
{{ with $resource }} {{- with $resource }}
<figure> <figure>
{{ if $disableImageOptimization }} {{- if or $disableImageOptimization (eq .MediaType.SubType "svg")}}
<img <img
class="my-0 rounded-md" class="my-0 rounded-md"
loading="lazy" loading="lazy"
src="{{ .RelPermalink }}" src="{{ .RelPermalink }}"
alt="{{ $altText }}" alt="{{ $altText }}"
/> />
{{ else }} {{- else }}
<img <img
class="my-0 rounded-md" class="my-0 rounded-md"
loading="lazy" loading="lazy"
@@ -35,13 +35,13 @@
src="{{ (.Resize "660x").RelPermalink }}" src="{{ (.Resize "660x").RelPermalink }}"
alt="{{ $altText }}" alt="{{ $altText }}"
/> />
{{ end }} {{- end }}
{{ with $caption }}<figcaption>{{ . | markdownify }}</figcaption>{{ end }} {{ with $caption }}<figcaption>{{ . | markdownify }}</figcaption>{{ end }}
</figure> </figure>
{{ else }} {{- else }}
<figure> <figure>
<img class="my-0 rounded-md" loading="lazy" src="{{ $url.String }}" alt="{{ $altText }}" /> <img class="my-0 rounded-md" loading="lazy" src="{{ $url.String }}" alt="{{ $altText }}" />
{{ with $caption }}<figcaption>{{ . | markdownify }}</figcaption>{{ end }} {{ with $caption }}<figcaption>{{ . | markdownify }}</figcaption>{{ end }}
</figure> </figure>
{{ end }} {{- end }}
{{ end }} {{- end }}
+7 -2
View File
@@ -1,2 +1,7 @@
<a href="{{ .Destination | safeURL }}" {{ with .Title}} title="{{ . }}"{{ end }} {{ if or (strings.HasPrefix .Destination "http:") (strings.HasPrefix .Destination "https:") }} target="_blank"{{ end }}> <a href="{{ .Destination | safeURL }}"
{{ .Text | safeHTML }}</a> {{- with .Title -}}
title="{{ . }}"
{{- end }}
{{- if or (strings.HasPrefix .Destination "http:") (strings.HasPrefix .Destination "https:") }} target="_blank"{{ end }}>
{{- .Text | safeHTML -}}
</a>
+1 -1
View File
@@ -27,7 +27,7 @@
{{ if .Site.Params.footer.showCopyright | default true }} {{ if .Site.Params.footer.showCopyright | default true }}
<p class="text-sm text-neutral-500 dark:text-neutral-400"> <p class="text-sm text-neutral-500 dark:text-neutral-400">
{{- with replace .Site.Params.copyright "{ year }" now.Year }} {{- with replace .Site.Params.copyright "{ year }" now.Year }}
{{ . | emojify }} {{ . | markdownify }}
{{- else }} {{- else }}
&copy; &copy;
{{ now.Format "2006" }} {{ now.Format "2006" }}
+41 -41
View File
@@ -2,49 +2,49 @@
{{ if .Get "default" }} {{ if .Get "default" }}
{{ template "_internal/shortcodes/figure.html" . }} {{ template "_internal/shortcodes/figure.html" . }}
{{ else }} {{ else }}
{{ $url := urls.Parse (.Get "src") }} {{- $url := urls.Parse (.Get "src") }}
{{ $altText := .Get "alt" }} {{- $altText := .Get "alt" }}
{{ $caption := .Get "caption" }} {{- $caption := .Get "caption" }}
{{ $href := .Get "href" }} {{- $href := .Get "href" }}
{{ $class := .Get "class" }} {{- $class := .Get "class" }}
{{ $target := .Get "target" | default "_blank" }} {{- $target := .Get "target" | default "_blank" }}
{{ $nozoom := .Get "nozoom" | default false }} {{- $nozoom := .Get "nozoom" | default false -}}
<figure> <figure>
{{ with $href }}<a href="{{ . }}" {{ with $target }}target="{{ . }}"{{ end }}>{{ end }} {{- with $href }}<a href="{{ . }}" {{ with $target }}target="{{ . }}"{{ end }}>{{ end -}}
{{ if findRE "^https?" $url.Scheme }} {{- if findRE "^https?" $url.Scheme }}
<img class="my-0 rounded-md {{ with $nozoom }} nozoom {{ end }}{{ with $class }} {{ . }} {{ end }}" src="{{ $url.String }}" alt="{{ $altText }}" /> <img class="my-0 rounded-md{{ with $nozoom }} nozoom{{ end }}{{ with $class }} {{ . }}{{ end }}" src="{{ $url.String }}" alt="{{ $altText }}" />
{{ else }} {{- else }}
{{ $resource := "" }} {{- $resource := "" }}
{{ if $.Page.Resources.GetMatch ($url.String) }} {{- if $.Page.Resources.GetMatch ($url.String) }}
{{ $resource = $.Page.Resources.GetMatch ($url.String) }} {{- $resource = $.Page.Resources.GetMatch ($url.String) }}
{{ else if resources.GetMatch ($url.String) }} {{- else if resources.GetMatch ($url.String) }}
{{ $resource = resources.Get ($url.String) }} {{- $resource = resources.Get ($url.String) }}
{{ end }} {{- end }}
{{ with $resource }} {{- with $resource }}
{{ if $disableImageOptimization }} {{- if or $disableImageOptimization (eq .MediaType.SubType "svg")}}
<img <img
class="my-0 rounded-md {{ with $nozoom }} nozoom {{ end }}{{ with $class }} {{ . }} {{ end }}" class="my-0 rounded-md{{ with $nozoom }} nozoom{{ end }}{{ with $class }} {{ . }}{{ end }}"
src="{{ .RelPermalink }}" src="{{ .RelPermalink }}"
alt="{{ $altText }}" alt="{{ $altText }}"
/> />
{{ else }} {{- else }}
<img <img
class="my-0 rounded-md {{ with $nozoom }} nozoom {{ end }}{{ with $class }} {{ . }} {{ end }}" class="my-0 rounded-md{{ with $nozoom }} nozoom{{ end }}{{ with $class }} {{ . }}{{ end }}"
srcset=" srcset="
{{ (.Resize "330x").RelPermalink }} 330w, {{ (.Resize "330x").RelPermalink }} 330w,
{{ (.Resize "660x").RelPermalink }} 660w, {{ (.Resize "660x").RelPermalink }} 660w,
{{ (.Resize "1024x").RelPermalink }} 1024w, {{ (.Resize "1024x").RelPermalink }} 1024w,
{{ (.Resize "1320x").RelPermalink }} 2x" {{ (.Resize "1320x").RelPermalink }} 2x"
src="{{ (.Resize "660x").RelPermalink }}" src="{{ (.Resize "660x").RelPermalink }}"
alt="{{ $altText }}" alt="{{ $altText }}"
/> />
{{ end }} {{- end }}
{{ else }} {{- else }}
<img class="my-0 rounded-md {{ with $nozoom }} nozoom {{ end }}{{ with $class }} {{ . }} {{ end }}" src="{{ $url.String }}" alt="{{ $altText }}" /> <img class="my-0 rounded-md{{ with $nozoom }} nozoom{{ end }}{{ with $class }} {{ . }}{{ end }}" src="{{ $url.String }}" alt="{{ $altText }}" />
{{ end }} {{- end }}
{{ end }} {{- end }}
{{ with $caption }}<figcaption>{{ . | markdownify }}</figcaption>{{ end }} {{ with $caption }}<figcaption>{{ . | markdownify }}</figcaption>{{ end }}
{{ if $href }}</a>{{ end }} {{ if $href }}</a>{{ end }}
</figure> </figure>
{{ end }} {{- end -}}
+1 -1
View File
@@ -1,3 +1,3 @@
<ol class="border-l-2 border-primary-500 dark:border-primary-300"> <ol class="border-l-2 border-primary-500 dark:border-primary-300 list-none">
{{- .Inner -}} {{- .Inner -}}
</ol> </ol>
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "hugo-blowfish-theme", "name": "hugo-blowfish-theme",
"version": "2.69.0", "version": "2.70.0",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "hugo-blowfish-theme", "name": "hugo-blowfish-theme",
"version": "2.69.0", "version": "2.70.0",
"hasInstallScript": true, "hasInstallScript": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
+2 -2
View File
@@ -1,7 +1,7 @@
{ {
"name": "hugo-blowfish-theme", "name": "hugo-blowfish-theme",
"version": "2.69.0", "version": "2.70.0",
"description": "Blowfish theme for Hugo", "description": "Blowfish theme for Hugo.",
"scripts": { "scripts": {
"postinstall": "vendor-copy", "postinstall": "vendor-copy",
"assets": "rimraf assets/vendor && vendor-copy", "assets": "rimraf assets/vendor && vendor-copy",
+1 -1
View File
@@ -1 +1 @@
v0.126.2 v0.126.3