drop <main>, use <article role="main"> — bold landmark structure

body direct children: <nav>, <header>, <article role="main">, <footer>
- <nav>: site navigation (own landmark)
- <header>: page identity — title, author, date, metadata
- <article role="main">: content (screen reader gets landmark via role)
- <footer>: site footer

No <main> wrapper. Fewer tags, clearer signal.
Header block defined per-layout (prose gets eyebrow/date, docs gets hgroup).
Content block defined per-layout (docs adds sidebar <nav> + <aside> TOC).
This commit is contained in:
Vigilio Desto 2026-04-10 20:33:25 +02:00
parent 169374e2fd
commit c2261bfc9f
Signed by: vigilio
GPG key ID: 159D6AD58C8E55E9
7 changed files with 291 additions and 357 deletions

View file

@ -1,32 +1,30 @@
{{ define "title" }}{{ .Site.Title }}{{ end }}
{{ define "main" }}
<main>
<article data-layout="prose">
<header>
<hgroup>
<h1>{{ .Site.Title }}</h1>
<p>{{ .Site.Params.description | default "An agent-first approach to web generation." }}</p>
</hgroup>
</header>
<section>
<h2>Recent</h2>
{{ range first 10 .Site.RegularPages }}
<article>
<header>
<h3><a href="{{ .Permalink }}">{{ .Title }}</a></h3>
<p data-text="dim">
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "January 2006" }}</time>
{{ with .Params.eyebrow }} · {{ . }}{{ end }}
</p>
</header>
{{ with .Summary }}<p>{{ . }}</p>{{ end }}
</article>
{{ end }}
</section>
</article>
</main>
{{ define "header" }}
<header>
<hgroup>
<h1>{{ .Site.Title }}</h1>
<p>{{ .Site.Params.description | default "An agent-first approach to web generation." }}</p>
</hgroup>
</header>
{{ end }}
{{ define "content" }}
<article role="main">
<section>
<h2>Recent</h2>
{{ range first 10 .Site.RegularPages }}
<article>
<header>
<h3><a href="{{ .Permalink }}">{{ .Title }}</a></h3>
<p data-text="dim">
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "January 2006" }}</time>
{{ with .Params.eyebrow }} · {{ . }}{{ end }}
</p>
</header>
{{ with .Summary }}<p>{{ . }}</p>{{ end }}
</article>
{{ end }}
</section>
</article>
{{ end }}