Tweaks for gemini and opensearch

This commit is contained in:
JP Hastings-Spital 2024-06-19 22:30:07 +01:00
parent 90945c9e8c
commit cba4822d89
5 changed files with 17 additions and 13 deletions

View file

@ -24,6 +24,7 @@
{{- with .OutputFormats.Get "RSS" -}}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" (.Permalink | absURL) .MediaType | safeHTML }}
{{- end -}}
{{ printf "<atom:link href=\"/opensearch.xml\" rel=\"search\" type=\"application/opensearchdescription+xml\" />" }}
{{- range $i, $page := $pages -}}
{{- if $page.Params.inReplyTo -}}{{ continue }}{{- end -}}
<item>

View file

@ -38,8 +38,7 @@ Get in touch if you'd like to go to these, or any other events⁺, together!
=> /calendar/ 🗓️ My events calendar
{{ end }}
{{ $notePage := index (where .Site.RegularPages "Section" "eq" "notes") 0 -}}
{{ with $notePage }}## A recent note
{{ with (partial "latest-non-reply-note.obj") }}## A recent note
📅 {{ .Page.Date.Format "January 2, 2006 — 15:04 (MST)" }}
{{ trim (partial "markdown.gmi" .Page.RenderShortcodes) "\r\n " }}{{ end }}

View file

@ -0,0 +1,11 @@
{{- $notePages := where .Site.RegularPages "Section" "eq" "notes" -}}
{{- $notePage := index $notePages 0 -}}
{{- if $notePage.Params.inReplyTo -}}
{{- range $notePages -}}
{{- if not .Params.inReplyTo -}}
{{- $notePage = . -}}
{{- break -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- return $notePage -}}

View file

@ -68,17 +68,7 @@
</div>
{{- end -}}
{{- $notePages := where .Site.RegularPages "Section" "eq" "notes" -}}
{{- $notePage := index $notePages 0 -}}
{{- if $notePage.Params.inReplyTo -}}
{{- range $notePages -}}
{{- if not .Params.inReplyTo -}}
{{- $notePage = . -}}
{{- break -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- with $notePage -}}
{{- with (partial "latest-non-reply-note.obj") -}}
<div class="note">
<div class="context">{{ partial "svg.html" (dict "name" "message") }} <a href="{{ .RelPermalink }}"><date datetime="{{ dateFormat "2006-01-02T15:04:05-0700" .Date }}" title="Posted on {{ dateFormat "Monday Jan 2 2006 at 03:04 MST" .Date }}" data-pagefind-sort="date">
{{ partial "year-relative-date.html" .Date }}</date></a>

View file

@ -5,4 +5,7 @@
<Image width="16" height="16" type="image/x-icon">/favicon.ico</Image>
<Image width="32" height="32" type="image/png">/favicon-32x32.png</Image>
<Url type="text/html" template="https://www.byjp.me/search?q={searchTerms}"/>
<AdultContent>false</AdultContent>
<Language>en-gb</Language>
<SyndicationRight>limited</SyndicationRight>
</OpenSearchDescription>