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

Compare commits

..

5 commits

Author SHA1 Message Date
Rohan Kumar
22dfabd262
Give transcripts back their headings
<div> can't be given an accessible name, and a <section> should have a
heading. Sigh.
2022-06-29 21:40:35 -07:00
Rohan Kumar
f12a5b4883
New note: your WYSIWYG editor 2022-06-29 19:58:25 -07:00
Rohan Kumar
4cb2f44afc
Avoid overwriting htmltest cache 2022-06-29 18:15:28 -07:00
Rohan Kumar
7bd9784653
Microdata: fix relative urls, add a11y metadata
- Add a11y metadata to transcribed images to communicate the presence of
  a transcript
- Fix relative urls in navigation: make them absolute urls, so that the
  parsed navigation elements have the correct destinations.

This also switches image transcripts from a section with a heading to a
div with an ARIA label. That should reduce duplication between the
<summary> content and the heading while still being semantically sound.
2022-06-29 18:05:48 -07:00
Rohan Kumar
ec1ace911b
Fix bad links
- Switch an abs link to a relative one
- Account for a site move
- Manually correct a couple dead links to point to the Wayback Machine
- Automatically switch some webmention links to the Wayback Machine
2022-06-29 08:42:23 -07:00
17 changed files with 52 additions and 23 deletions

View file

@ -56,11 +56,13 @@ validate-html:
htmlproofer:
htmlproofer $(OUTPUT_DIR) --disable-external --report-invalid-tags --report-missing-names --report-missing-doctype --report-eof-tags --report-mismatched-tags --check-html --check-opengraph --check-favicon --empty-alt-ignore --file-ignore $(OUTPUT_DIR)/search/index.html --url-ignore '../music.txt'
linter-configs/htmltest.yml:
rsync $(RSYNCFLAGS) deploy@seirdy.one:/home/deploy/refcache.json linter-configs/htmltest/refcache.json
# basic checks for generated HTML and broken links. Persist the broken
# link cache remotely so we can run this in CI.
.PHONY: htmltest
htmltest:
rsync $(RSYNCFLAGS) deploy@seirdy.one:/home/deploy/refcache.json linter-configs/htmltest/refcache.json
htmltest: linter-configs/htmltest.yml
htmltest -c linter-configs/htmltest.yml $(OUTPUT_DIR)
rsync $(RSYNCFLAGS) linter-configs/htmltest/refcache.json deploy@seirdy.one:/home/deploy/refcache.json

View file

@ -1,7 +1,8 @@
---
title: "DDG and Bing"
date: 2022-06-02T20:59:38-07:00
replyURI: "https://www.librepunk.club/@penryn/108411423190214816"
lastMod: 2022-06-19T16:23:17-07:00
replyURI: "https://web.archive.org/web/20220620162417/https://www.librepunk.club/@penryn/108411423190214816"
replyTitle: "how would html.duckduckgo.com fit into this?"
replyType: "SocialMediaPosting"
replyAuthor: "@penryn@www.librepunk.club"

View file

@ -17,7 +17,7 @@ I've been planning on writing a big "meta" post explaining how this site is buil
However, I still have a ways to go. Here's what I plan on adding:
- Add some semantic markup to list online "friends", probably using [FOAF ontology](http://xmlns.com/foaf/spec/)
- Add some semantic markup to list online "friends", probably using [FOAF ontology](https://web.archive.org/web/20220627164317/http://xmlns.com/foaf/spec/)
- Preview Webmention entry contents
- Related to previous point: create a blogroll
- Automatic POSSE of notes to Fedi (it's mostly manual right now)

View file

@ -0,0 +1,15 @@
---
title: "Your WYSIWYG editor"
date: 2022-06-29T19:58:20-07:00
replyURI: "https://floss.social/@alcinnz/108562628015470513"
replyTitle: "Something I'd love to tackle once I've got text rendering working well…is to tackle WYSIWYG"
replyType: "SocialMediaPosting"
replyAuthor: "Adrian Cochrane"
replyAuthorURI: "https://adrian.geek.nz/"
---
Would love to see something that conforms properly to the WAI Authoring practices and supports microformats2. That could combine well with a stylesheet that doesn't use any custom classes, just microformats classes and `role` attribute selectors.
My current site doesn't actually use any classes in the CSS apart from `image-rendering` utility classes; I use POSH, ARIA and microformats selectors for everything else.
The great thing about a purely semantic stylesheet is re-usability across other websites.

View file

@ -97,7 +97,7 @@ TE techniques typically revolve around minimizing the size of one's fingerprint,
If an adversary employs multiple fingerprinting vectors, then normalizing or randomizing a small subset of those vectors might make a user stand out even more.
{{< transcribed-image type="comic" id="xkcd-1105" >}}
{{< transcribed-image type="comic" itemtype="VisualArtwork" id="xkcd-1105" >}}
#### <span itemprop="name">xkcd comic: license plate</span> {#infinite-scrolling}

View file

@ -363,7 +363,7 @@ A hybrid between the two is paginated content in which users click a "load next
I've discussed loading pages in the background, but what about saving a page offline (e.g. with <kbd>Ctrl</kbd> + <kbd>s</kbd>)? While lazy-loading won't interfere with the ability to save a complete page offline, some of these related issues can. Excessive pagination and inline scrolling make it impossible to download a complete page without manually scrolling or following pagination links to the end.
{{< transcribed-image type="comic" id="xkcd-1309" >}}
{{< transcribed-image type="comic" itemtype="VisualArtwork" id="xkcd-1309" >}}
#### <span itemprop="name">xkcd comic: infinite scrolling</span> {#infinite-scrolling}

View file

@ -207,7 +207,7 @@ Andrea of Le Alternative translated this article to Italian:
=> https://www.lealternative.net/2021/12/13/whatsapp-e-laddomesticamento-degli-utenti/ WhatsApp e laddomesticamento degli utenti
puer robustus translated this article to German:
=> https://www.puer-robustus.eu/2022/06/10/domestizierung-von-nutzern.html WhatsApp und die Domestizierung von Nutzern
=> https://blog.puer-robustus.eu/domestizierung-von-nutzern/ WhatsApp und die Domestizierung von Nutzern
## References and Endnotes

View file

@ -226,7 +226,7 @@ Translations are always welcome.
- {{<mention-work itemprop="workTranslation" itemtype="BlogPosting">}}{{<indieweb-person itemprop="author" nickname="Skariko" url="https://www.lealternative.net/author/skariko/" org="Le Alternative" org-url="https://lealternative.net/">}} translated this article to <span itemprop="inLanguage">Italian</span>: {{<cited-work lang="it-IT" rel="alternate" url="https://www.lealternative.net/2021/12/13/whatsapp-e-laddomesticamento-degli-utenti/" name="WhatsApp e laddomesticamento degli utent">}}{{</mention-work>}}.
- {{<mention-work itemprop="workTranslation" itemtype="BlogPosting">}}{{<indieweb-person itemprop="author" nickname="puer robustus" url="https://www.puer-robustus.eu">}} translated this article to <span itemprop="inLanguage">German</span>: {{<cited-work lang="de-DE" rel="alternate" url="https://www.puer-robustus.eu/2022/06/10/domestizierung-von-nutzern.html" name="WhatsApp und die Domestizierung von Nutzern">}}{{</mention-work>}}.
- {{<mention-work itemprop="workTranslation" itemtype="BlogPosting">}}{{<indieweb-person itemprop="author" nickname="puer robustus" url="https://www.puer-robustus.eu">}} translated this article to <span itemprop="inLanguage">German</span>: {{<cited-work lang="de-DE" rel="alternate" url="https://blog.puer-robustus.eu/domestizierung-von-nutzern/" name="WhatsApp und die Domestizierung von Nutzern">}}{{</mention-work>}}.
[^1]: <span itemprop="citation">Pierotti, R.; Fogg, B. (2017). The First Domestication: How Wolves and Humans Coevolved. Yale University Press.</span>

View file

@ -94,7 +94,7 @@ Some engines I have not yet tested, but hope to try in the future:
Machine-friendliness
--------------------
I think making a site machine-friendly is a great alternative perspective to traditional SEO, the latter of which I think tends to incentivise low-quality content and makes searching difficult. It's a big part of what I've decided to call ["agent optimization"](http://seirdy.one/notes/2022/06/23/agent-optimization/).
I think making a site machine-friendly is a great alternative perspective to traditional SEO, the latter of which I think tends to incentivise low-quality content and makes searching difficult. It's a big part of what I've decided to call ["agent optimization"]({{<relref "notes/agent-optimization.md">}}).
This site is **parser-friendly.** It uses polygot (X)HTML5 markup containing schema.org microdata, microformats2, and legacy microformats. Microformats are useful for IndieWeb compatibility; schema.org microdata is useful for various forms of content-extraction (such as "reading mode" implementations) and search engines. I've also sprinkled in some Creative Commons vocabulary using RDFa syntax.

View file

@ -22,7 +22,7 @@
{{ range .Site.Menus.main -}}
{{ $isCurrent := false }}
<li itemprop="hasPart" itemscope="" itemtype="https://schema.org/SiteNavigationElement">
<a href="{{ .URL }}" itemprop="url"
<a href="{{ .URL | absURL}}" itemprop="url"
{{- if or (eq .Identifier "notes" ) (eq .Identifier "articles") (eq .Identifier "bookmarks") }} rel="feed"{{- end }}
{{- if or (eq $currentPage.RelPermalink .URL) ($currentPage.HasMenuCurrent "main" .) -}}{{- $isCurrent = true }} aria-current="page"{{- end -}}>
{{- if or $isCurrent (eq $currentPage.Section .Title) (and (eq $currentPage.Section "posts") (eq .Identifier "articles")) -}}

View file

@ -8,7 +8,7 @@
{{- 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 -}}.
{{- $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="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>.

View file

@ -1,4 +1,4 @@
{{- $wbmLinks := (slice "https://si3t.ch/log/2021-04-18-entetes-floc.html" "https://xmpp.org/2021/02/newsletter-02-feburary/" "https://gurlic.com/technology/post/393626430212145157" "https://gurlic.com/technology/post/343249858599059461") -}}
{{- $wbmLinks := (slice "https://si3t.ch/log/2021-04-18-entetes-floc.html" "https://xmpp.org/2021/02/newsletter-02-feburary/" "https://gurlic.com/technology/post/393626430212145157" "https://gurlic.com/technology/post/343249858599059461" "https://www.librepunk.club/@penryn/108411423190214816" "https://benign.town/@josias/108457015755310198") -}}
<hr />
<section aria-labelledby="webmentions">
<h2 id="webmentions" tabindex="-1">Webmen&#173;tions</h2>

View file

@ -1,7 +1,7 @@
{{- define "main" -}}
{{- $canonicalRelPermalink := .RelPermalink | replaceRE "^/~seirdy/" "/" }}
{{- .Scratch.Set "codeIndex" 1 -}}
<main itemprop="hasPart" itemscope="" itemtype="https://schema.org/BlogPosting{{ if .Params.techarticle }} https://schema.org/TechArticle{{ end }}" itemid="{{ .Site.Params.CanonicalBaseURL }}{{ $canonicalRelPermalink }}">
<main itemprop="mainEntity" itemscope="" itemtype="https://schema.org/BlogPosting{{ if .Params.techarticle }} https://schema.org/TechArticle{{ end }}" itemid="{{ .Site.Params.CanonicalBaseURL }}{{ $canonicalRelPermalink }}">
<link itemprop="isPartOf" href="{{ .Site.Params.CanonicalBaseURL }}/" />
{{ partial "full-article.html" . }}
{{ partial "webmentions.html" . }}

View file

@ -6,5 +6,5 @@
src="data:image/png;base64,{{ $favicon_base64 }}" />
{{- else -}}
<img itemprop="image" class="u-photo photo" width="16" height="16" alt=""
src="{{ $favicon_svg.RelPermalink }}" />
src="{{ $favicon_svg.Permalink }}" />
{{- end }}

View file

@ -81,7 +81,7 @@
type="image/png" />
<img{{ with .Get "class" }} class="{{ . }}"{{ end }}
width="{{ $img_width }}" height="{{ $img_height }}"
src="{{ $light_png.RelPermalink }}" alt='{{ .Get "alt" }}'
src="{{ $light_png_src.Permalink }}" alt='{{ .Get "alt" }}'
{{ with .Parent -}}
{{ if eq .Name "transcribed-image-figure" -}}
{{ with .Get "id" -}}
@ -89,7 +89,7 @@
{{ end -}}
{{ end -}}
{{ if or (eq .Name "image-figure") (eq .Name "transcribed-image-figure") -}}
itemprop="contentUrl url"
itemprop="image contentUrl"
{{ end -}}
{{- end -}}
decoding="async" />

View file

@ -1,11 +1,15 @@
<details>
<summary>Toggle transcript</summary>
{{ with .Parent -}}
<section id="transcript-{{ .Get "id" }}">
<h5>{{ .Get "type" | humanize}} transcript.</h5>
{{- $type := "image" -}}
{{- with .Get "type" -}}
{{- $type = . -}}
{{- end -}}
<div itemprop="embeddedTextCaption">
{{ .Inner | markdownify | safeHTML }}
<details>
<summary>Toggle {{ $type }} <span itemprop="accessibilityFeature">transcript</span></summary>
<section id="transcript-{{ .Get "id" }}">
<h5>{{ $type | humanize }} transcript</h5>
{{- end }}
<div itemprop="embeddedTextCaption">
{{ .Inner | markdownify | safeHTML }}
</div>
</section>
</details>

View file

@ -1,7 +1,14 @@
{{- $type := "image" -}}
{{- $itemtype := "CreativeWork" -}}
{{- with .Get "type" -}}
{{- $type = . -}}
{{- end -}}
<section aria-label="{{ $type }}, caption, and transcript" itemprop="mentions" itemscope="" itemtype="https://schema.org/ImageObject" id="{{ .Get "id" }}" tabindex="-1">
{{- with .Get "itemtype" -}}
{{- $itemtype = . -}}
{{- end -}}
<section
aria-label="{{ $type }}, caption, and transcript"
itemprop="mentions" itemscope="" itemtype="https://schema.org/{{ $itemtype }} https://schema.org/ImageObject"
id="{{ .Get "id" }}" tabindex="-1">
{{ .Inner | markdownify | safeHTML }}
</section>