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

Compare commits

..

No commits in common. "b00a608f51a50b9801d1baa996fb3f8443456caf" and "9609e4fbb224b262e01055bea468d5e257c03be4" have entirely different histories.

6 changed files with 12 additions and 38 deletions

View file

@ -112,7 +112,7 @@ html {
input,
dt > a,
summary,
aside > a, /* Used for section permalinks */
h2 + a,
li > a {
padding: .75em .25em;
}
@ -136,7 +136,7 @@ html {
margin-bottom: -1em;
}
aside > a {
h2 + a {
margin: -.75em -.25em;
}
@ -144,7 +144,7 @@ html {
header > nav,
/* List items with direct hyperlink children should only have one hyperlink. */
li > a,
aside > a,
h2 + a,
nav ol a {
margin-left: -.25em;
display: inline-block;

View file

@ -14,6 +14,9 @@
* use, see below. */
article summary,
section[aria-labelledby="webmentions"],
/* Currently only used for in-page heading anchors,
* useless in printouts. */
h2 + a,
/* You can't navigate in a printout. */
footer,
/* splitting up sections with <hr> is unnecesary if those

View file

@ -1,14 +0,0 @@
---
title: "Agent optimization"
date: 2022-06-23T16:12:13-07:00
---
I'm thinking about coining a term to reflect a non-toxic alternative to "search engine optimization" (SEO). Working name: "agent optimization".
[MDN has SEO guidelines](https://developer.mozilla.org/en-US/docs/MDN/Contribute/Howto/Write_for_SEO) because people often find MDN articles through general-purpose search engines. I noticed that a subset of their advice is directly beneficial to readers.
For example: imagine two pages have almost the same content (e.g. pages on the `width` and `height` CSS properties). Nearly-identical pages confuse search engines. To avoid duplicate content, authors are encouraged to differentiate the pages by using different examples. This is actually great for readers: when a reader navigates from one page to the next, it'd be unhelpful to present the same example again. Perhaps the `width` example could describe adaptation to a narrow viewport, while the `height` example could describe the trick for handling image aspect ratios with `height: auto`.
Lots of SEO is actually just basic design and accessibility guidelines: use good link names, remember alt-text, be mobile-friendly, use headings, don't require tons of JS to display content, prefer semantic HTML, etc. Stuff like structured data also helps improve reader-mode implementations and makes content-blocking easier.
SEO gets toxic when it veers into copywriting guidelines, tricks like adding the current year to your heading ("Best products to buy in <var>CURRENT_YEAR</var>"), backlink-building, etc. Much of this does include so-called "white-hat SEO". I think that I should distinguish "agent optimization" from "search engine optimization" by making it about accommodating the tools people use to find information, rather than about ranking high in search results or getting clicks. Once I finish my current <abbr title="Work In Progress">WIP</abbr> blog post (it's about how to make privacy recommendations for different audiences), I think I'll write about this. In the meantime, any ideas you have are welcome; please share them.

View file

@ -1,22 +1,8 @@
<!--
Intended properties of this render-hook:
1. Headings are focusable, but not from the keyboard. This allows VoiceOver to navigate to a heading from the TOC.
2. <h2> elements are followed by a section permalink, which is useful for sharing a subset of an article.
3. The page looks as similar as possible to graphical-browsers, textual browsers (e.g. Lynx), and assistive technologies.
4. Reading-mode implementations preserve headings without getting confused by the section permalinks.
5. Machine-translation works as intended with or without assistive technologies.
6. All of this applies with or without CSS.
To achieve all these properties, I had to break the first rule of ARIA and misuse <aside>.
I'm a markup criminal now.
-->
<h{{ .Level }} id="{{ .Anchor | safeURL }}" tabindex="-1">{{ .Text | safeHTML -}}</h{{ .Level }}>
{{- if and (eq .Level 2) (eq .Page.Section "posts") -}}
<!--crimes-->
<aside role="none"><a
{{- if and (eq .Level 2) (eq .Page.Section "posts") }}
<a
id="{{ .Anchor | safeURL }}-anchor" href="#{{ .Anchor | safeURL }}"
aria-labelledby="{{ .Anchor | safeURL }}-prefix {{ .Anchor | safeURL }}">
<span id="{{ .Anchor | safeURL }}-prefix">Permalink to section</span>
</a></aside>
</a>
{{- end }}

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/") -}}
<hr />
<section aria-labelledby="webmentions">
<h2 id="webmentions" tabindex="-1">Webmen&#173;tions</h2>

View file

@ -1,13 +1,12 @@
DirectoryPath: "public"
IgnoreDirs:
- "search"
CacheExpires: "168h" # seven days
CacheExpires: "96h" # four days
CheckFavicon: true
EnforceHTML5: true
IgnoreAltMissing: true # an empty alt makes presentation-role explicit, it's not a defect.
EnforceHTTPS: true
ExternalTimeout: 180
HTTPConcurrencyLimit: 96
ExternalTimeout: 30
IgnoreHTTPS:
- "http://192.168.1"
- "http://localhost:"