feat(blox-tailwind): add support for Hugo v0.148

This commit is contained in:
George Cushen committed 2025-08-16 02:08:34 +01:00
1 parent 44e75541f7
commit 96c8bf099f
6 files changed
+20 -16

No files matched your search

+2 -2
View File
@@ -4,7 +4,7 @@ markup:
renderHooks: renderHooks:
link: link:
# Process backlinks hook # Process backlinks hook
enableDefault: true useEmbedded: fallback
renderer: renderer:
# Render HTML in Markdown # Render HTML in Markdown
unsafe: true unsafe: true
@@ -58,7 +58,7 @@ sitemap:
changefreq: weekly changefreq: weekly
module: module:
hugoVersion: hugoVersion:
min: '0.134.1' min: '0.148.2'
extended: true extended: true
imports: imports:
- path: github.com/HugoBlox/hugo-blox-builder/modules/blox-analytics - path: github.com/HugoBlox/hugo-blox-builder/modules/blox-analytics
@@ -110,9 +110,11 @@
{{ if $pub_type_display }} {{ if $pub_type_display }}
<div class="font-bold text-2xl">{{ i18n "publication_type" }}</div> <div class="font-bold text-2xl">{{ i18n "publication_type" }}</div>
<div> <div>
{{ if and .Params.publication_types (gt (len .Params.publication_types) 0) }}
<a href="{{ range first 1 (.GetTerms "publication_types") }}{{.RelPermalink}}{{end}}"> <a href="{{ range first 1 (.GetTerms "publication_types") }}{{.RelPermalink}}{{end}}">
{{ $pub_type_display }} {{ $pub_type_display }}
</a> </a>
{{ end }}
</div> </div>
{{ end }} {{ end }}
@@ -1,8 +1,7 @@
{{/* Display author list. */}} {{/* Display author list. */}}
{{- $taxonomy := "authors" }} {{ if .Params.authors }}
{{ if .Param $taxonomy }} {{ range $index, $value := (.GetTerms "authors") }}
{{ range $index, $value := (.GetTerms $taxonomy) }}
{{- /* Highlight the author's name? */ -}} {{- /* Highlight the author's name? */ -}}
{{- $highlight_name := .Page.Params.highlight_name | default false -}} {{- $highlight_name := .Page.Params.highlight_name | default false -}}
@@ -1,7 +1,6 @@
{{ $taxonomy := "tags" }} {{ if .Params.tags }}
{{ if .Param $taxonomy }}
<div class="flex justify-center"> <div class="flex justify-center">
{{ range $index, $value := (.GetTerms $taxonomy) }} {{ range $index, $value := (.GetTerms "tags") }}
<a class="no-underline bg-primary-100 hover:bg-primary-300 text-primary-800 text-xs font-medium mr-2 px-2.5 py-0.5 lg:px-5 lg:py-2 rounded dark:bg-primary-900 dark:hover:bg-primary-700 dark:text-primary-300" href="{{ .RelPermalink }}">{{ .LinkTitle }}</a> <a class="no-underline bg-primary-100 hover:bg-primary-300 text-primary-800 text-xs font-medium mr-2 px-2.5 py-0.5 lg:px-5 lg:py-2 rounded dark:bg-primary-900 dark:hover:bg-primary-700 dark:text-primary-300" href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
{{ end }} {{ end }}
</div> </div>
@@ -38,12 +38,14 @@
{{end}} {{end}}
<div class=""> <div class="">
<div class=""> <div class="">
<div class="flex gap-3"> <div class="flex gap-3">
{{ range $index, $value := first 1 ($item.GetTerms "tags") }} {{ if and $item.Params.tags (gt (len $item.Params.tags) 0) }}
<a href="{{.RelPermalink}}"><span {{ range $index, $value := first 1 ($item.GetTerms "tags") }}
class="inline-block text-xs font-medium tracking-wider uppercase mt-5 text-primary-700 dark:text-primary-300">{{ .Page.LinkTitle }}</span></a> <a href="{{.RelPermalink}}"><span
{{end}} class="inline-block text-xs font-medium tracking-wider uppercase mt-5 text-primary-700 dark:text-primary-300">{{ .Page.LinkTitle }}</span></a>
</div> {{end}}
{{ end }}
</div>
<!-- <div class="relative line-clamp-2" style="display: block; height: 4em">--> <!-- <div class="relative line-clamp-2" style="display: block; height: 4em">-->
<h2 class="text-lg font-semibold leading-snug tracking-tight mt-2 dark:text-white"><a <h2 class="text-lg font-semibold leading-snug tracking-tight mt-2 dark:text-white"><a
href="{{ $link }}" {{ $target | safeHTMLAttr }}><span href="{{ $link }}" {{ $target | safeHTMLAttr }}><span
@@ -63,8 +65,9 @@
<!-- <a href="">--> <!-- <a href="">-->
{{ if $item.Params.authors }} {{ if $item.Params.authors }}
<div class="flex items-center gap-3"> <div class="flex items-center gap-3">
{{ range $index, $value := first 1 ($item.GetTerms "authors") }} {{ if and $item.Params.authors (gt (len $item.Params.authors) 0) }}
<div class="relative h-5 w-5 flex-shrink-0"> {{ range $index, $value := first 1 ($item.GetTerms "authors") }}
<div class="relative h-5 w-5 flex-shrink-0">
{{ $avatar := (.Resources.ByType "image").GetMatch "*avatar*" }} {{ $avatar := (.Resources.ByType "image").GetMatch "*avatar*" }}
{{ if $avatar }} {{ if $avatar }}
{{ $authorImage := $avatar.Process "Fill 50x50 Center 95 webp" }} {{ $authorImage := $avatar.Process "Fill 50x50 Center 95 webp" }}
@@ -86,6 +89,7 @@
</span> </span>
</div> </div>
{{end}} {{end}}
{{ end }}
<!-- </a>--> <!-- </a>-->
<span class="text-xs text-gray-300 dark:text-gray-600">•</span> <span class="text-xs text-gray-300 dark:text-gray-600">•</span>
{{end}} {{end}}