5 Commits

Author SHA1 Message Date
b4bff1e36d Use content view to customize <title> on author's page 2025-07-04 15:50:38 -05:00
1f9477759d Revert "debug: Show current template filename in bottom right"
This reverts commit ff4998f31b.

Not that useful. In the future, probably need to make an entire like
debug menu with a bunch of info about the current page rendering and a
bunch of variables.
2025-07-04 15:35:58 -05:00
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
10 changed files with 12 additions and 20 deletions

View File

@ -7,18 +7,17 @@
{{ end }}
{{ with index . "src" }}
{{ $media := . }}
{{ 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" }}
<video controls preload="metadata">
<source src="{{ $media.Permalink }}" alt="{{ $media.Title }}">
<source src="{{ .Permalink }}" alt="{{ .Title }}">
{{ i18n "browser_no_video_support" }}
</video>
{{ end }}
{{ if not $hidecaption }}
{{ with $media.Title }}
{{ with .Title }}
<figcaption>
{{ . | markdownify }}
</figcaption>

View File

@ -24,11 +24,7 @@
<link rel="apple-touch-icon" href="{{ . | absURL }}" />
{{ end }}
{{ if .IsHome }}
<title>{{ .Site.Title | plainify }}</title>
{{ else }}
<title>{{ (print .Title " | " .Site.Title) | plainify }}</title>
{{ end }}
<title>{{ .Render "head_title" }}</title>
{{ partial "seo-tags/opengraph.html" . }}
{{ partial "seo-tags/twitter-cards.html" . }}

View File

@ -1,5 +1,5 @@
{{ 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" }}
{{ if index $.Site.Taxonomies "authors" }}

View File

@ -4,7 +4,7 @@
{{ $categories = $categories | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }}
{{ 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" }}
{{ delimit $categories ", " | safeHTML }}
</div>

View File

@ -4,7 +4,7 @@
{{ $series = $series | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }}
{{ 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" }}
{{ delimit $series ", " | safeHTML }}
</div>

View File

@ -4,7 +4,7 @@
{{ $tags = $tags | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }}
{{ 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" }}
{{ delimit $tags ", " | safeHTML }}
</div>

View File

@ -0,0 +1 @@
{{ (print .Title "'s Posts | " .Site.Title) | plainify }}

View File

@ -8,18 +8,12 @@
{{ partial "top.html" . }}
{{ if hugo.IsServer -}}
<div style="position: fixed; bottom: 25px; right: 25px;">
{{ templates.Current.Name }}
</div>
{{ end -}}
<div class="main-container">
{{ if not .IsHome }}
{{ partial "breadcrumb.html" . }}
{{ end }}
<main id="main-content" data-pagefind-body>
<main id="main-content" {{ if .IsPage }}data-pagefind-body{{ end }}>
{{ block "main" . }}
THIS TEXT SHOULD NOT SHOW. YUZSIQGHE (that string is so I can grep for it)
{{ end }}

1
layouts/head_title.html Normal file
View File

@ -0,0 +1 @@
{{ (print .Title " | " .Site.Title) | plainify }}

View File

@ -0,0 +1 @@
{{ .Site.Title | plainify }}