pagefind update

This commit is contained in:
Wouter Groeneveld 2022-11-11 09:57:17 +01:00
parent 3d9ef1a3bc
commit 4c2a3e0f30
3 changed files with 8 additions and 11 deletions

View File

@ -9,7 +9,7 @@
"scripts": {
"precommit": "node hooks/precommit.js",
"postdeploy": "node hooks/postdeploy.js",
"search": "echo 'executing Hugo+Pagefind (locally)...' && /opt/homebrew/bin/hugo && /Users/wgroeneveld/.cargo/bin/pagefind --source docs --bundle-dir ../static/_pagefind"
"search": "echo 'executing Hugo+Pagefind (locally)...' && hugo && /usr/local/bin/pagefind --source docs --bundle-dir ../static/_pagefind && hugo serve"
},
"repository": {
"type": "git",

View File

@ -5,7 +5,7 @@
{{ $url = (printf "%s%s" .Page.Permalink $url) }}
{{ end }}
<a href="{{ $url | absURL }}" class="lbox">
<img src="{{ $url | absURL }}" loading="lazy" class="img-responsive"{{ with .Text }} alt="{{ . }}"{{ end }}{{ with .Title}} title="{{ . }}" alt="{{ . }}"{{ end }}>
<img src="{{ $url | absURL }}" loading="lazy" class="img-responsive"{{ with .Text }} alt="{{ . }}"{{ end }}{{ with .Title}} title="{{ . }}" alt="{{ . }}"{{ end }} data-pagefind-index-attrs="title">
</a>
{{ with .Title }}
<figcaption>{{ . }}</figcaption>

View File

@ -1,10 +1,9 @@
{{ define "main" }}
<div class="content-column" data-pagefind-body>
<div class="content-column">
{{ partial "mobile_nav_toggle.html" . }}
<div class="row">
<article class="h-entry">
<article class="h-entry" data-pagefind-body>
<header>
<h1 class="p-name" data-pagefind-meta="title">{{ .Title }}</h1>
{{ if isset $.Params "date" }}
@ -58,13 +57,11 @@
{{ end }}
{{ end }}
</div>
{{ partial "single-comments" . }}
{{ partial "single-mentions" . }}
<hr/>
</article>
{{ partial "single-comments" . }}
{{ partial "single-mentions" . }}
<hr/>
</div>
</div>
{{ end }}