Mostly working - images are broken

This commit is contained in:
JP Hastings-Spital 2023-09-12 22:03:44 +01:00
parent a3eb71e353
commit 4e1e94c469
9 changed files with 34 additions and 8 deletions

View file

@ -18,7 +18,7 @@ sitemap:
{{< emoji "💍" >}}The biggest news from that trip was [Yvette proposing to me](https://adventure.awaits.us/a-patagonian-love-story/) at the top of the Torres del Paine mountains — I'm so excited to be marrying her, even if the wedding planning is triply complex because of our mixed nationalities!
{{< figure src="engaged.webp" alt="A photo of Yvette and I grinning at the camera, with the engagement compass Yvette just gave JP" >}}
{{< figure src="./engaged.webp" alt="A photo of Yvette and I grinning at the camera, with the engagement compass Yvette just gave JP" >}}
{{< emoji "😢" >}}The second biggest news from that trip was my Mum discovering she has a terminal cancer. I'm struggling with this a fair amount at the moment, but I have a superlative support network, and Deliveroo embracing my choice to move to a 4-day work week to spend more time with her has been wonderful. I'm (clearly) being quite open about this, but I'd appreciate your efforts in finding quieter times if you'd like to talk to me about this; I hope it's easy to understand how this topic can emotionally blind-side me!

3
content/pagefind.yaml Normal file
View file

@ -0,0 +1,3 @@
source: public
# Don't use _pagefind as Github Pages will ignore it
bundle_dir: search

View file

@ -15,7 +15,7 @@ tags:
- from-tumblr
---
![A terrain map of the earth over the Atlantic, showing red dots moving between the UK and other places on earth](./where-on-the-web.jpg)
{{< figure src="where-on-the-web.jpg" alt="A terrain map of the earth over the Atlantic, showing red dots moving between the UK and other places on earth" >}}
Where On The Web is aliiiiive!

23
content/search.md Normal file
View file

@ -0,0 +1,23 @@
---
title: Search
emoji: 🕵️‍♂️
type: site-infra
_build:
list: never
---
I quite enjoy this site _not_ having search, as it means I (and others!) need to explore it to find what's there. Having said that, I do find myself in need of finding something I _know_ is there, but which I can't put my finger on…
Sigh, it's time for search; but I'm sneaking this away where it's not too visible, so you'll have to have previously found this to know you can put `/search` into your browser to use it 😉
<link href="/search/pagefind-ui.css" rel="stylesheet">
<script src="/search/pagefind-ui.js" type="text/javascript"></script>
<div id="search"></div>
<script>
window.addEventListener('DOMContentLoaded', (event) => {
new PagefindUI({
element: "#search",
showEmptyFilters: false,
});
});
</script>

View file

@ -1,7 +1,7 @@
{{ define "main" }}
{{ $paginator := .Paginate .Data.Pages }}
<main class="posts">
<main class="posts" {{ if eq .Kind "taxonomy" }}data-pagefind-ignore{{ end }}>
{{ partial "generic-list-header.html" . }}
<h1 class="p-name">
@ -10,7 +10,7 @@
</h1>
{{ if .Content }}
<div class="content">{{ .Content }}</div>
<div class="content" data-pagefind-body>{{ .Content }}</div>
{{ end }}
{{ range $paginator.Pages.GroupByDate "2006" }}

View file

@ -83,7 +83,7 @@
</blockquote>
{{ end }}
<div class="post-content e-content">
<div class="post-content e-content" data-pagefind-body data-pagefind-filter="type:{{.Type}}">
{{ .Content }}
</div>
</article>

View file

@ -16,7 +16,7 @@
{{ end }}
{{ if .Content }}
<div class="post-content e-content">{{ .Content }}</div>
<div class="post-content e-content" data-pagefind-body>{{ .Content }}</div>
{{ end }}
</article>

View file

@ -2,7 +2,7 @@
{{- if .Get "link" -}}
<a href="{{ .Get "link" }}"{{ with .Get "target" }} target="{{ . }}"{{ end }}{{ with .Get "rel" }} rel="{{ . }}"{{ end }}>
{{- end }}
<img src="{{ .Get "src" }}"
<img src="{{ path.Join $.Page.RelPermalink (.Get "src") | absURL }}"
{{- if or (.Get "alt") (.Get "caption") }}
alt="{{ with .Get "alt" }}{{ . }}{{ else }}{{ .Get "caption" | markdownify| plainify }}{{ end }}"
{{- end -}}

View file

@ -3,6 +3,6 @@
<span class="closed">Click to show this spoiler</span>
<span class="open">Hide spoiler</span>
</summary>
<p>{{ .Inner | markdownify }}</p>
<p data-pagefind-ignore>{{ .Inner | markdownify }}</p>
</details>
{{ .Page.Store.Set "hasSpoilers" true }}