5 Commits

Author SHA1 Message Date
cc7cec07df Revert "Set height and width specifically on img tag"
This reverts commit be12afb50d.

It causes issues with aspect ratio when the raw width of the image is
wider than the width in CSS pixels allowed by the body max-width.

Not reverting the refactor that removes {{ $img = . }} because I don't
know why that was there and will see if it works fine with it still
removed.
2025-07-03 20:15:17 -05:00
be12afb50d Set height and width specifically on img tag 2025-07-03 18:47:55 -05:00
9d761b2f81 Only index pages; add pagefind metadata based on series/tags/categories 2025-07-02 02:08:01 -05:00
ba9c106a88 Add data-pagefind-body to main content element
In preparation for adding Pagefind search support to bbaovanc.com. Those
templates will just go in the bbaovanc.com tree instead.
2025-07-02 01:21:05 -05:00
150ee40fd5 Fix website title not showing up in OpenGraph tags
I don't know how I never noticed this or how long it's been missing.
Maybe it was never there?
2025-07-02 01:20:11 -05:00
7 changed files with 9 additions and 10 deletions

View File

@ -7,18 +7,17 @@
{{ end }} {{ end }}
{{ with index . "src" }} {{ with index . "src" }}
{{ $media := . }}
{{ if eq .MediaType.MainType "image" }} {{ if eq .MediaType.MainType "image" }}
<img src="{{ $media.Permalink }}" alt="{{ $media.Title }}" loading="lazy" /> <img src="{{ .Permalink }}" alt="{{ .Title }}" loading="lazy" />
{{ else if eq .MediaType.MainType "video" }} {{ else if eq .MediaType.MainType "video" }}
<video controls preload="metadata"> <video controls preload="metadata">
<source src="{{ $media.Permalink }}" alt="{{ $media.Title }}"> <source src="{{ .Permalink }}" alt="{{ .Title }}">
{{ i18n "browser_no_video_support" }} {{ i18n "browser_no_video_support" }}
</video> </video>
{{ end }} {{ end }}
{{ if not $hidecaption }} {{ if not $hidecaption }}
{{ with $media.Title }} {{ with .Title }}
<figcaption> <figcaption>
{{ . | markdownify }} {{ . | markdownify }}
</figcaption> </figcaption>

View File

@ -1,5 +1,5 @@
{{ with .Params.authors }} {{ with .Params.authors }}
<span class="page-metadata-item" aria-label="{{ i18n "aria_post_meta_authors" }}"> <span class="page-metadata-item" data-pagefind-meta="authors" aria-label="{{ i18n "aria_post_meta_authors" }}">
{{ partial "icon.html" "user-circle" }} {{ partial "icon.html" "user-circle" }}
{{ if index $.Site.Taxonomies "authors" }} {{ if index $.Site.Taxonomies "authors" }}

View File

@ -4,7 +4,7 @@
{{ $categories = $categories | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }} {{ $categories = $categories | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }}
{{ end }} {{ end }}
<div class="page-metadata-section categories" aria-label="{{ i18n "aria_post_meta_categories" }}"> <div class="page-metadata-section categories" data-pagefind-meta="categories" aria-label="{{ i18n "aria_post_meta_categories" }}">
{{ partial "icon.html" "folder" }} {{ partial "icon.html" "folder" }}
{{ delimit $categories ", " | safeHTML }} {{ delimit $categories ", " | safeHTML }}
</div> </div>

View File

@ -4,7 +4,7 @@
{{ $series = $series | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }} {{ $series = $series | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }}
{{ end }} {{ end }}
<div class="page-metadata-section series" aria-label="{{ i18n "aria_post_meta_series" }}"> <div class="page-metadata-section series" data-pagefind-meta="series" aria-label="{{ i18n "aria_post_meta_series" }}">
{{ partial "icon.html" "files" }} {{ partial "icon.html" "files" }}
{{ delimit $series ", " | safeHTML }} {{ delimit $series ", " | safeHTML }}
</div> </div>

View File

@ -4,7 +4,7 @@
{{ $tags = $tags | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }} {{ $tags = $tags | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }}
{{ end }} {{ end }}
<div class="page-metadata-section tags" aria-label="{{ i18n "aria_post_meta_tags" }}"> <div class="page-metadata-section tags" data-pagefind-meta="tags" aria-label="{{ i18n "aria_post_meta_tags" }}">
{{ partial "icon.html" "tag" }} {{ partial "icon.html" "tag" }}
{{ delimit $tags ", " | safeHTML }} {{ delimit $tags ", " | safeHTML }}
</div> </div>

View File

@ -33,7 +33,7 @@
<meta property="og:locale" content="{{ . }}"> <meta property="og:locale" content="{{ . }}">
{{ end }} {{ end }}
{{ with .Site.Params.title }} {{ with .Site.Title }}
<meta property="og:site_name" content="{{ . }}"> <meta property="og:site_name" content="{{ . }}">
{{ end }} {{ end }}

View File

@ -19,7 +19,7 @@
{{ partial "breadcrumb.html" . }} {{ partial "breadcrumb.html" . }}
{{ end }} {{ end }}
<main id="main-content"> <main id="main-content" {{ if .IsPage }}data-pagefind-body{{ end }}>
{{ block "main" . }} {{ block "main" . }}
THIS TEXT SHOULD NOT SHOW. YUZSIQGHE (that string is so I can grep for it) THIS TEXT SHOULD NOT SHOW. YUZSIQGHE (that string is so I can grep for it)
{{ end }} {{ end }}