mirror of
https://github.com/by-jp/www.byjp.me.git
synced 2025-08-09 05:36:07 +01:00
Tweaks for gemini and opensearch
This commit is contained in:
parent
90945c9e8c
commit
cba4822d89
5 changed files with 17 additions and 13 deletions
|
@ -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>
|
||||
|
|
|
@ -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 }}
|
||||
|
|
11
layouts/partials/latest-non-reply-note.obj
Normal file
11
layouts/partials/latest-non-reply-note.obj
Normal 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 -}}
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue