1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-10 00:12:09 +00:00

Compare commits

..

4 commits

Author SHA1 Message Date
Rohan Kumar
a4cc0a02b8
Remove invalid link child of author 2023-11-29 13:45:52 -08:00
Rohan Kumar
ceac2c2a57
Switch from find -exec to xargs 2023-11-29 13:40:05 -08:00
Rohan Kumar
bf7423e44a
Add websub and other feed metadata 2023-11-29 13:37:17 -08:00
Rohan Kumar
12b542c351
Actually use local bookmarks file 2023-11-29 11:54:53 -08:00
4 changed files with 10 additions and 6 deletions

View file

@ -23,6 +23,7 @@ disableKinds = ["taxonomy", "term"]
highlight = false
icon = "/favicon.svg"
indieAuth = "https://indielogin.com/auth"
hub = "https://websubhub.com/hub"
[frontmatter]
lastmod = ['lastmod', ':git', 'date', 'publishDate']

View file

@ -7,8 +7,7 @@
Timestamp format: <code>YYYY-MM-DD HH:MM</code>, as per <cite><a href="https://www.ietf.org/rfc/rfc3339.txt">RFC 3339</a></cite>
</p>
<ol>
{{ $bookmarks := getJSON "https://seirdy.one/data/bookmarks.json" -}}
{{ range sort $bookmarks "tags" "desc" -}}
{{ range sort (index .Site.Data "bookmarks") "tags" "desc" -}}
{{ $bookmark := . -}}
{{- $tags := split $bookmark.tags "," -}}
{{- $firstTag := index $tags 0 }}

View file

@ -12,6 +12,7 @@
{{- $faviconSvg := resources.Get "/favicon.svg" | resources.Fingerprint "md5" -}}
{{- $image := resources.Get "/favicon192.png" | resources.Fingerprint "md5" -}}
{{- $atomLogo := resources.Get "/atom.svg" | resources.Fingerprint "md5" -}}
{{- /*rejected http://backend.userland.com/creativeCommonsRssModule, as it's completely redundant with <rights> and rel-license. */ -}}
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<feed
xmlns="http://www.w3.org/2005/Atom"
@ -35,6 +36,7 @@
{{- end -}}
</subtitle>
<link rel="self" type="application/atom+xml" href="{{ .Permalink }}atom.xml" />
<link rel="hub" href="{{ .Site.Params.Hub }}" />
<icon>{{ $faviconSvg.Permalink }}</icon>
<webfeeds:icon>{{ $image.Permalink }}</webfeeds:icon>
<webfeeds:cover>{{ $atomLogo.Permalink }}</webfeeds:cover>
@ -52,6 +54,7 @@
<uri>https://seirdy.one/</uri>
</author>
<admin:errorReportsTo rdf:resource="mailto:{{ .Site.Author.email }}" />
<rights type="text">>Copyright © {{ now.Year }} Rohan Kumar</rights>
<link rel="license" type="application/rdf+xml" href="https://creativecommons.org/licenses/by-sa/4.0/rdf" />
<updated>{{ site.LastChange.UTC.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</updated>
<generator uri="https://gohugo.io/" version="{{ .Site.Hugo.Version }}">Hugo {{ .Site.Hugo.Version }}</generator>
@ -65,7 +68,7 @@
<published>{{ .Date.UTC.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</published>
<updated>{{ .Lastmod.UTC.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</updated>
<author><name>{{ .Site.Author.name }}</name><uri>https://seirdy.one/</uri></author>
<rights>CC-BY-SA 4.0</rights>
<rights type="text">>Copyright © {{ now.Year }} Rohan Kumar</rights>
<link rel="license" type="application/rdf+xml" href="https://creativecommons.org/licenses/by-sa/4.0/rdf" />
{{- with .Params.replyURI -}}
<thr:in-reply-to ref="{{ . }}" href="{{ . }}" />

View file

@ -3,7 +3,8 @@
# Runs xhtmlize-single-file.sh on every single html file in the output dir.
# exits if xhtmlize-single-file fails.
# no pipefail here since there are no pipes.
#shellcheck disable=SC3040 # This only sets pipefail if it's available and otherwise does nothing
set -o pipefail 2>/dev/null || true
set -e -u
output_dir="$1"
@ -25,5 +26,5 @@ trap cleanup EXIT
export XMLLINT_INDENT=' '
export OUTPUT_DIR="$output_dir"
find "$output_dir" -type f -name '*.html' -exec sh "$script_dir/xhtmlize-single-file.sh" {} \;
find "$output_dir" -type f -name '*.xml' -exec xmllint --noblanks --encode UTF-8 --noent {} --output {} \;
find "$output_dir" -type f -name '*.html' | xargs -n1 sh "$script_dir/xhtmlize-single-file.sh"
find "$output_dir" -type f -name '*.xml' | xargs -I_ xmllint --noblanks --encode UTF-8 --noent _ --output _