mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-23 21:02:09 +00:00
Compare commits
No commits in common. "672d89d0078f79a987e0e5bb735c815febb37c6c" and "0f930c28f74eafcc2d4a2906fb53b4bf3d438cb0" have entirely different histories.
672d89d007
...
0f930c28f7
7 changed files with 23 additions and 18 deletions
|
@ -18,7 +18,7 @@
|
|||
</a>
|
||||
</h2>
|
||||
Noted <time itemprop="datePublished" class="dt-published published" datetime="{{ .Date.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02 15:04:05" }}</time>
|
||||
{{- if gt (sub .Lastmod.Unix .Date.Unix) 3600 -}}
|
||||
{{ if gt (sub .Lastmod.Unix .Date.Unix) 3600 -}}
|
||||
, updated <time{{ if not (.Params.evergreen) }} itemprop="dateModified" class="dt-updated updated"{{ end }} datetime="{{ .Lastmod.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Lastmod.Format "2006-01-02 15:04:05" }}</time>
|
||||
{{- end }}
|
||||
<div class="e-content entry-content" itemprop="articleBody">{{ partial "processed-content.html" . }}</div>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<article class="h-entry hentry"><!--Once WAI-ARIA 1.3 gains traction, I'll add aria-details for webmentions.-->
|
||||
<header>
|
||||
<h1 itemprop="name headline" class="p-name entry-title">{{ .Title }}</h1>
|
||||
{{- if not .Params.disableMeta -}}
|
||||
{{- partial "post-meta.html" . -}}
|
||||
{{- end -}}
|
||||
{{- if not .Params.disableMeta }}
|
||||
{{ partial "post-meta.html" . }}
|
||||
{{- end }}
|
||||
<hr />
|
||||
</header>
|
||||
<div class="e-content entry-content" itemprop="articleBody">
|
||||
|
|
|
@ -8,12 +8,13 @@
|
|||
{{- else -}}
|
||||
{{- $logURL = $logURL | strings.ReplaceRE `\.md` `.gmi` -}}
|
||||
{{- end -}}
|
||||
{{- $action }} <time{{ if not (.Params.evergreen) }} itemprop="dateCreated datePublished" class="dt-published published"{{ end }} datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02" }}</time> by {{- partial "indieweb-author.html" -}} on his <a rel="canonical" itemprop="mainEntityOfPage url" class="u-url url" href="{{ .Site.Params.CanonicalBaseURL }}{{ $canonicalRelPermalink }}">Website</a>{{- with .OutputFormats.Get "gemtext" -}}{{- printf " " -}}and <a rel="syndication" class="u-syndication" href="{{replace .Permalink "/gemini" "" 1 | safeURL}}">Gemini capsule</a>{{- end -}}.
|
||||
{{- if gt (sub .Lastmod.Unix .Date.Unix) 900 -}}
|
||||
{{- $action }} <time{{ if not (.Params.evergreen) }} itemprop="dateCreated datePublished" class="dt-published published"{{ end }} datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02" }}</time>
|
||||
by {{- partial "indieweb-author.html" -}} on his <a rel="canonical" itemprop="mainEntityOfPage url" class="u-url url" href="{{ .Site.Params.CanonicalBaseURL }}{{ $canonicalRelPermalink }}">Website</a>{{- with .OutputFormats.Get "gemtext" -}}{{- printf " " -}}and <a rel="syndication" class="u-syndication" href="{{replace .Permalink "/gemini" "" 1 | safeURL}}">Gemini capsule</a>{{- end -}}.
|
||||
{{ if gt (sub .Lastmod.Unix .Date.Unix) 900 -}}
|
||||
<br />
|
||||
Last updated <time itemprop="dateModified" class="dt-updated updated" datetime="{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Lastmod.Format "2006-01-02" }}</time>. <a href="{{ $logURL }}">Changelog</a>.
|
||||
{{- end -}}
|
||||
{{- if not $isNotes -}}
|
||||
{{- end }}
|
||||
{{ if not $isNotes -}}
|
||||
<br />
|
||||
{{ partial "wordcount.html" . -}}
|
||||
{{- end -}}
|
||||
{{ end }}
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
{{- $thousands := string (div .WordCount 1000) -}}
|
||||
{{- $displayCount = printf "%s thousand" $thousands -}}
|
||||
About
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
<data itemprop="wordCount" value="{{ .WordCount }}">
|
||||
{{- $displayCount -}}
|
||||
{{ $displayCount }}
|
||||
</data> words
|
||||
{{- with .ReadingTime -}}
|
||||
{{- $displayTime := string . -}}
|
||||
|
@ -14,6 +14,6 @@ About
|
|||
{{- $minutes := mod . 60 -}}
|
||||
{{- $displayTime = (printf "%d hour and %d" $hours $minutes) | safeHTML -}}
|
||||
{{- end -}}
|
||||
; a{{ if lt . 10 }} short{{ else if and (gt . 20) (lt . 30) }} somewhat long{{ else if and (gt . 29) (lt . 60) }} long{{ else if gt . 59 }} very long {{ end -}}
|
||||
; a{{ if lt . 10 }} short{{ else if and (gt . 20) (lt . 30) }} somewhat long{{ else if and (gt . 29) (lt . 60) }} long{{ else if gt . 59 }} very long{{ end }}
|
||||
<time itemprop="timeRequired" datetime="PT{{ . }}M">{{ $displayTime }} minute</time> read
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
{{- $favicon := resources.Get "/favicon.png" -}}<!-- re-using the favicon for the author photo -->
|
||||
{{- $favicon_base64 := $favicon.Content | base64Encode -}}<!--
|
||||
<!-- re-using the favicon for the author photo -->
|
||||
{{- $favicon := resources.Get "/favicon.png" -}}
|
||||
{{- $favicon_base64 := $favicon.Content | base64Encode -}}
|
||||
<!--
|
||||
Reader mode implementations use .p-author, itemprop=author, and/or .author to add
|
||||
a byline. Some also strip elements matching the "byline" class to avoid duplicating
|
||||
the byline. Mozilla Readability uses both microformats1 and microformats2 while
|
||||
|
@ -20,7 +22,8 @@
|
|||
schema.org and a mode to detect microformats2, and then stuck to those standards.
|
||||
|
||||
(btw this is all made of <span> cuz it is supposed to be inline)
|
||||
--><span itemprop="author copyrightHolder" itemscope="" itemtype="https://schema.org/Person" itemid="https://seirdy.one/#seirdy" class="h-card p-author author vcard">
|
||||
-->
|
||||
<span itemprop="author copyrightHolder" itemscope="" itemtype="https://schema.org/Person" itemid="https://seirdy.one/#seirdy" class="h-card p-author author vcard">
|
||||
<a itemprop="url" href="https://seirdy.one/" rel="author me home cc:attributionURL" class="u-url u-uid url" property="cc:attributionName">
|
||||
{{ partial "indieweb-icon.html" -}}
|
||||
<span itemprop="name" class="p-name fn n">
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
# XML tooling.
|
||||
# this means that every index.html file has an equivalent index.xhtml file.
|
||||
# content negotiation allows an agent to pick html or xhtml.
|
||||
# echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
|
||||
|
||||
find "$1" -type f -name '*.html' \
|
||||
-exec sh -c 'echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" >"${0%*.html}.xhtml" && xmlfmt -i " " -f "$0" | busybox sed -e :a -e "/./,\$!d;/^\n*\$/{\$d;N;};/\n\$/ba" | sd -f m "\n(?:\t*)?</" "</" | sd -f m "<pre>\n\t*<code" "<pre><code" | sd -f m "\(\n\t*<abbr" "(<abbr" | pee "sed 5d >>\"${0%*.html}.xhtml\"" "sponge \"$0\""' {} \;
|
||||
-exec sh -c 'echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" >"${0%*.html}.xhtml" && xmlfmt -i " " -f "$0" | busybox sed -e :a -e "/./,\$!d;/^\n*\$/{\$d;N;};/\n\$/ba" | sd -f m "\n(?:\t*)?</" "</" | sd -f m "<pre>\n\t*<code" "<pre><code" | pee "sed 5d >>\"${0%*.html}.xhtml\"" "sponge \"$0\""' {} \;
|
||||
# done
|
||||
|
|
Loading…
Reference in a new issue