xonecas.io
8356
Wx

www-xonecas-io / commit 912e3a0

meta descriptions, robots.txt, sitemap.xml, llms.txt, and the Lighthouse accessibility fixes (1036)

Co-Authored-By: Claude Opus 5.5

Sean Caetano Martin2026-11-08 912e3a0e1c295c11efc6ae59462cd35169d72270 parent 6912ed9

15 files changed

internal/site/assets/site.css+6−6
@@ -8,10 +8,10 @@
88 --color-paper: light-dark(#f4efe3, #15140f);
99 --color-card: light-dark(#fffaf0, #1d1b15);
1010 --color-ink: light-dark(#1a1a1a, #f1ead8);
11- --color-soft: light-dark(#1a1a1a99, #f1ead899);
11+ --color-soft: light-dark(#1a1a1ab3, #f1ead899);
1212 --color-line: light-dark(#1a1a1a22, #f1ead81f);
1313 --color-empty: light-dark(#e7dfcd, #25231c);
14- --color-accent: light-dark(#a8461f, #ffc94d);
14+ --color-accent: light-dark(#9e411c, #ffc94d);
1515 --color-det: light-dark(#1a1a1a, #ffd166);
1616 --color-det-fg: light-dark(#ffd166, #15140f);
1717 --color-pre: light-dark(#1a1a1a, #0b0a07);
@@ -93,7 +93,7 @@
9393 .code { margin: 0; padding-right: 1rem; tab-size: 4; }
9494 .code > span { display: block; }
9595 .code > span:target { background: #ffd16626; }
96- .code > span > a { display: inline-block; min-width: 3.5rem; padding-right: 1rem; text-align: right; color: #f1ead866; text-decoration: none; user-select: none; }
96+ .code > span > a { display: inline-block; min-width: 3.5rem; padding-right: 1rem; text-align: right; color: #f1ead88c; text-decoration: none; user-select: none; }
9797 .code b { font-weight: inherit; }
9898 .code .c, .code .cp { color: #f1ead880; font-style: italic; }
9999 .code .k { color: #ffc94d; }
@@ -106,12 +106,12 @@
106106 /* Two-thumb range: two range inputs stacked on a track under a bar per month, and only their thumbs take the pointer.
107107 The bars are inset by half a thumb so each lines up with the thumb position of its month. */
108108 .range { position: relative; height: 4rem; }
109-.range::before { content: ""; position: absolute; inset: auto 0 calc(.625rem - 1.5px); height: 3px; background: var(--color-ink); }
110-#bars { position: absolute; inset: 0 .625rem 1.5rem; display: flex; align-items: flex-end; }
109+.range::before { content: ""; position: absolute; inset: auto 0 calc(.75rem - 1.5px); height: 3px; background: var(--color-ink); }
110+#bars { position: absolute; inset: 0 .625rem 1.75rem; display: flex; align-items: flex-end; }
111111 #bars i { flex: 1; min-height: 2px; background: var(--color-line); }
112112 #bars i.on { background: var(--color-accent); }
113113 @media (width >= 40rem) { #bars { gap: 1px; } }
114-.range input { position: absolute; inset: auto 0 0; height: 1.25rem; width: 100%; margin: 0; appearance: none; background: none; pointer-events: none; }
114+.range input { position: absolute; inset: auto 0 0; height: 1.5rem; width: 100%; margin: 0; appearance: none; background: none; pointer-events: none; }
115115 .range input::-webkit-slider-thumb { appearance: none; pointer-events: auto; width: 1.25rem; height: 1.25rem; border: 1.5px solid var(--color-ink); border-radius: 2px; background: var(--color-accent); cursor: grab; }
116116 .range input::-moz-range-thumb { pointer-events: auto; width: 1.25rem; height: 1.25rem; box-sizing: border-box; border: 1.5px solid var(--color-ink); border-radius: 2px; background: var(--color-accent); cursor: grab; }
117117 .range input:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--color-ink); outline-offset: 2px; }
internal/site/build.go+3−0
@@ -86,6 +86,9 @@ func Build(projects []project.Project, out, tailwind string) error {
8686 if err := writeSearch(out, shown); err != nil {
8787 return err
8888 }
89+ if err := writeSEO(out, shown); err != nil {
90+ return err
91+ }
8992 if err := os.WriteFile(filepath.Join(out, ".stamp"), []byte(stamp), 0o644); err != nil {
9093 return err
9194 }
internal/site/seo.go+60−0
@@ -0,0 +1,60 @@
1+package site
2+
3+import (
4+ "cmp"
5+ "fmt"
6+ "os"
7+ "path/filepath"
8+ "slices"
9+ "strings"
10+
11+ "xonecas.io/site/internal/project"
12+)
13+
14+// BaseURL is where the site is served, for the files crawlers and agents read.
15+const BaseURL = "https://xonecas.io"
16+
17+// writeSEO writes robots.txt, sitemap.xml with the main pages and every project, and llms.txt,
18+// a markdown map of the site and its projects for language models.
19+func writeSEO(out string, shown []project.Project) error {
20+ if len(shown) == 0 {
21+ return nil
22+ }
23+ commits := 0
24+ for _, p := range shown {
25+ commits += p.Commits
26+ }
27+ shown = slices.Clone(shown)
28+ slices.SortStableFunc(shown, func(a, b project.Project) int { return cmp.Compare(b.Last, a.Last) })
29+ var sitemap, llms strings.Builder
30+ sitemap.WriteString(`<?xml version="1.0" encoding="UTF-8"?>` + "\n" + `<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">` + "\n")
31+ for _, p := range []string{"/", "/projects/", "/activity/"} {
32+ fmt.Fprintf(&sitemap, "<url><loc>%s%s</loc></url>\n", BaseURL, p)
33+ }
34+ fmt.Fprintf(&llms, "# xonecas.io\n\n> Every public project by Sean Caetano Martin (xonecas, sacenox) since %s: %d projects and %d commits, read-only.\n\n",
35+ shown[len(shown)-1].First[:4], len(shown), commits)
36+ fmt.Fprintf(&llms, "- [Overview](%s/): totals and every month of commits\n- [Projects](%[1]s/projects/): all projects, filterable by tag, topic, date and name\n- [Activity](%[1]s/activity/): my commits by year, newest first\n\n", BaseURL)
37+ fmt.Fprintf(&llms, "Each project has its files and README at /projects/<name>/, its history at /projects/<name>/commits/, and clones with `git clone %s/<name>.git`.\n\n## Projects\n\n", BaseURL)
38+ for _, p := range shown {
39+ fmt.Fprintf(&sitemap, "<url><loc>%s/projects/%s/</loc><lastmod>%s</lastmod></url>\n", BaseURL, p.Name, p.Last)
40+ about := []string{p.First + " to " + p.Last}
41+ if len(p.Languages) > 0 {
42+ about = append(about, p.Languages[0].Name)
43+ }
44+ if len(p.Topics) > 0 {
45+ about = append(about, strings.Join(p.Topics, ", "))
46+ }
47+ fmt.Fprintf(&llms, "- [%s](%s/projects/%s/): %s (%s)\n", p.Name, BaseURL, p.Name, cmp.Or(p.Description, "No description"), strings.Join(about, "; "))
48+ }
49+ sitemap.WriteString("</urlset>\n")
50+ for name, text := range map[string]string{
51+ "robots.txt": "User-agent: *\nAllow: /\n\nSitemap: " + BaseURL + "/sitemap.xml\n",
52+ "sitemap.xml": sitemap.String(),
53+ "llms.txt": llms.String(),
54+ } {
55+ if err := os.WriteFile(filepath.Join(out, name), []byte(text), 0o644); err != nil {
56+ return err
57+ }
58+ }
59+ return nil
60+}
internal/site/static/search.js+1−0
@@ -33,6 +33,7 @@ if (input && box && location.pathname !== "/projects/") {
3333 input.setAttribute("role", "combobox");
3434 input.setAttribute("aria-controls", "suggest");
3535 input.setAttribute("aria-autocomplete", "list");
36+ input.ariaExpanded = false;
3637 input.autocomplete = "off";
3738 input.addEventListener("focus", load, { once: true });
3839 input.addEventListener("input", suggest);
internal/site/templates/activity.html+1−1
@@ -1,4 +1,4 @@
1-{{define "activity.html"}}{{template "head" (printf "Activity %s%s" .Year (or (and (gt .Page 1) (printf ", page %d" .Page)) ""))}}{{template "nav" "Activity"}}
1+{{define "activity.html"}}{{template "head" (list (printf "Activity %s%s" .Year (or (and (gt .Page 1) (printf ", page %d" .Page)) "")) (printf "%d commits by xonecas in %s, newest first." .Total .Year))}}{{template "nav" "Activity"}}
22 <main class="px-4 sm:px-8 py-6 max-w-[1440px] mx-auto grid grid-cols-1 lg:grid-cols-[17rem_minmax(0,1fr)] gap-x-10 gap-y-8">
33 <aside class="order-2 lg:order-none">
44 <h2 class="font-bold text-lg mb-2">Years</h2>
internal/site/templates/browse.html+1−1
@@ -1,4 +1,4 @@
1-{{define "browse.html"}}{{template "head" (printf "%s · %s" .Path .Name)}}{{template "nav" "Projects"}}
1+{{define "browse.html"}}{{template "head" (list (printf "%s · %s" .Path .Name) (printf "%s in %s, a project by xonecas." .Path .Name))}}{{template "nav" "Projects"}}
22 <main class="px-4 sm:px-8 py-6 max-w-[1440px] mx-auto">
33 {{template "project-head" (dict "Row" .Row "Here" "files")}}
44 <div class="lg:grid lg:grid-cols-[16rem_minmax(0,1fr)] lg:gap-6">
internal/site/templates/commit.html+1−1
@@ -1,4 +1,4 @@
1-{{define "commit.html"}}{{template "head" (printf "%s · %s" .C.Subject .Name)}}{{template "nav" "Projects"}}
1+{{define "commit.html"}}{{template "head" (list (printf "%s · %s" .C.Subject .Name) (printf "Commit %s in %s: %s" .C.Short .Name .C.Subject))}}{{template "nav" "Projects"}}
22 <main class="px-4 sm:px-8 py-6 max-w-[1440px] mx-auto">
33 {{template "project-head" (dict "Row" .Row "Here" (printf "commit %s" .C.Short))}}
44 <article class="border-[1.5px] border-ink rounded-[2px] bg-card mb-6">
internal/site/templates/commits.html+1−1
@@ -1,4 +1,4 @@
1-{{define "commits.html"}}{{template "head" (printf "%s commits" .Name)}}{{template "nav" "Projects"}}
1+{{define "commits.html"}}{{template "head" (list (printf "%s commits" .Name) (printf "The commit history of %s, a project by xonecas." .Name))}}{{template "nav" "Projects"}}
22 <main class="px-4 sm:px-8 py-6 max-w-[1440px] mx-auto">
33 {{template "project-head" (dict "Row" .Row "Here" "commits")}}
44 <p class="text-sm text-soft mb-3">{{.Total}} commits on every branch and tag, newest first{{if gt .Pages 1}} · page {{.Page}} of {{.Pages}}{{end}}</p>
internal/site/templates/components.html+1−1
@@ -8,7 +8,7 @@
88 {{range $l := list "Overview" "Projects" "Activity"}}<a href="{{if eq $l "Overview"}}/{{else}}/{{lower $l}}/{{end}}" class="{{if eq $l $}}underline underline-offset-[6px] decoration-[3px]{{else}}no-underline{{end}}">{{$l}}</a>{{end}}
99 </nav>
1010 <button id="theme" type="button" title="Light or dark" aria-label="Switch between light and dark" class="ml-auto p-1 cursor-pointer hover:text-accent"><svg viewBox="0 0 16 16" width="20" height="20" aria-hidden="true"><circle cx="8" cy="8" r="6.5" fill="none" stroke="currentColor" stroke-width="1.5"/><path d="M8 1.5a6.5 6.5 0 0 1 0 13z" fill="currentColor"/></svg></button>
11- <form action="/projects/" class="relative w-full sm:w-auto"><input name="q" placeholder="Search projects" class="w-full sm:w-80 px-3 py-1.5 border-[1.5px] border-ink rounded-[2px] bg-card text-sm placeholder:text-soft">
11+ <form action="/projects/" class="relative w-full sm:w-auto"><input name="q" aria-label="Search projects" placeholder="Search projects" class="w-full sm:w-80 px-3 py-1.5 border-[1.5px] border-ink rounded-[2px] bg-card text-sm placeholder:text-soft">
1212 <div id="suggest" role="listbox" aria-label="Suggestions" hidden></div></form>
1313 </div></header>
1414 {{end}}
internal/site/templates/index.html+1−1
@@ -1,4 +1,4 @@
1-{{define "index.html"}}{{template "head" "Overview"}}{{template "nav" "Overview"}}
1+{{define "index.html"}}{{template "head" (list "Overview" (printf "Every public project by Sean Caetano Martin (xonecas) since %s: %d projects and %s commits, to browse and clone." (index .Wall 0).Year .Projects (comma .Commits)))}}{{template "nav" "Overview"}}
22 <main class="px-4 sm:px-8 py-6 max-w-[1440px] mx-auto grid grid-cols-1 lg:grid-cols-[17rem_minmax(0,1fr)] gap-x-10 gap-y-8">
33 <aside>
44 <div class="inline-block bg-det text-det-fg text-[64px] font-bold leading-[.9] tracking-tight px-3 pt-2 pb-1 rounded-[2px]">{{comma .Commits}}</div>
internal/site/templates/layout.html+6−2
@@ -1,8 +1,12 @@
1-{{define "head"}}<!doctype html>
1+{{define "head"}}{{/* list title description */}}<!doctype html>
22 <html lang="en">
33 <meta charset="utf-8">
44 <meta name="viewport" content="width=device-width,initial-scale=1">
5-<title>{{.}} · xonecas.io</title>
5+<title>{{index . 0}} · xonecas.io</title>
6+<meta name="description" content="{{index . 1}}">
7+<meta property="og:title" content="{{index . 0}}">
8+<meta property="og:description" content="{{index . 1}}">
9+<meta property="og:site_name" content="xonecas.io">
610 <link rel="icon" href="{{asset "/logo.svg"}}" type="image/svg+xml">
711 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
812 <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&family=IBM+Plex+Sans+Condensed:wght@400;600;700&family=IBM+Plex+Serif:ital@1&display=swap">
internal/site/templates/project.html+2−2
@@ -1,4 +1,4 @@
1-{{define "project.html"}}{{template "head" .P.Name}}{{template "nav" "Projects"}}
1+{{define "project.html"}}{{template "head" (list .P.Name (or .P.Description (printf "%s, a project by xonecas." .P.Name)))}}{{template "nav" "Projects"}}
22 <main class="px-4 sm:px-8 py-6 max-w-[1440px] mx-auto">
33 <header class="flex gap-5 items-start mb-6">
44 <div class="hidden sm:block">{{template "element" (dict "El" .Row.El "Size" "lg")}}</div>
@@ -8,7 +8,7 @@
88 <div class="pool flex flex-wrap gap-1 mt-3">{{range .P.Tags}}{{template "tag" .}}{{end}}
99 {{range $i, $t := .P.Topics}}<a href="/projects/?q={{$t}}" title="Projects about {{$t}}" style="--i:{{$i}}" class="flex no-underline">{{template "topic" $t}}</a>{{end}}</div>
1010 <p class="mt-3 text-sm text-soft">
11- <a href="commits/" class="text-ink"><b>{{.P.Commits}}</b> commits{{if ne .P.Commits .P.Total}} of {{.P.Total}}{{end}}</a> ·
11+ <a href="commits/" class="text-ink underline underline-offset-2"><b>{{.P.Commits}}</b> commits{{if ne .P.Commits .P.Total}} of {{.P.Total}}{{end}}</a> ·
1212 {{.P.First}} to {{.P.Last}} · {{.P.Files}} files
1313 </p>
1414 </div>
internal/site/templates/projects.html+1−1
@@ -1,4 +1,4 @@
1-{{define "projects.html"}}{{template "head" "Projects"}}{{template "nav" "Projects"}}
1+{{define "projects.html"}}{{template "head" (list "Projects" (printf "All %d public projects by xonecas, by tag, topic, activity and name." (len .Rows)))}}{{template "nav" "Projects"}}
22 <main class="px-4 sm:px-8 py-6 max-w-[1440px] mx-auto">
33 <h1 class="text-3xl font-bold mb-4"><span id="shown">{{len .Rows}}</span> projects</h1>
44 <form id="filters" hidden class="flex flex-wrap items-center gap-x-6 gap-y-2 mb-4 text-sm">
internal/site/templates/style.html+1−1
@@ -1,4 +1,4 @@
1-{{define "style.html"}}{{template "head" "Style"}}{{template "nav" "Style"}}
1+{{define "style.html"}}{{template "head" (list "Style" "The parts xonecas.io is built from.")}}{{template "nav" "Style"}}
22 <main class="px-4 sm:px-8 py-6 max-w-[1440px] mx-auto">
33 <h1 class="text-4xl font-bold">Style</h1>
44 <p class="font-serif italic text-soft mt-1 mb-8">02's heat wall in 20's periodic table. Light and dark, side by side.</p>
tickets/1036-seo-agent-accessibility.md+51−0
@@ -0,0 +1,51 @@
1+---
2+id: 1036
3+title: SEO/Agent accessibility
4+type: feature
5+status: review
6+priority: p2
7+created: 2026-11-08T05:16:54Z
8+updated: 2026-11-08T05:40:30Z
9+source: human
10+moves: 2026-11-08T05:19:58Z inbox todo drag; 2026-11-08T05:21:38Z todo doing drag; 2026-11-08T05:40:30Z doing review agent
11+area: site
12+---
13+
14+Lighthouse best practices, llms.txt, etc.
15+
16+https://web.dev/articles/ai-agent-site-ux for reference
17+
18+## Notes
19+
20+- 2026-11-08 05:40Z (agent): Done. Lighthouse (v12, against the dev server, light mode):
21+
22+ | page | accessibility | SEO | best practices |
23+ |---|---|---|---|
24+ | / | 90 → 100 | 91 → 100 | 79 (only HTTPS) |
25+ | /projects/ | 91 → 100 | 91 → 100 | 79 (only HTTPS) |
26+ | /projects/irvc/ | 91 → 100 | 91 → 100 | 79 (only HTTPS) |
27+ | /activity/ | 100 | 100 | 79 (only HTTPS) |
28+ | /projects/irvc/commits/ | 100 | 100 | not run |
29+ | a file page (irvc main.go) | 96 | 100 | not run |
30+
31+ The two best-practices failures are is-on-https and redirects-http. They come from the dev server on plain http, and Caddy will serve the real site over HTTPS.
32+
33+ What changed:
34+ - Every page has a meta description, plus og:title, og:description and og:site_name. head now takes (list title description). Project pages use the project's description, and the others get a line generated from their data, e.g. 'Every public project by Sean Caetano Martin (xonecas) since 2011: 82 projects and 2,775 commits, to browse and clone.'
35+ - New files written by the build (internal/site/seo.go):
36+ - /robots.txt: allows all and points to the sitemap.
37+ - /sitemap.xml: home, /projects/, /activity/, and the 82 project pages with lastmod set to their last commit.
38+ - /llms.txt: in the llms.txt format, a summary line, the three main pages, how project URLs and clones work, then every project with its description, dates, main language and topics, newest first.
39+ - BaseURL https://xonecas.io is a const there.
40+ - Contrast (WCAG AA 4.5:1):
41+ - --color-soft in light mode went from 60% to 70% ink. It was 4.1–4.5:1 on paper, card and grey.
42+ - The light accent went from #a8461f to #9e411c. It was 4.44:1 on the grey head-commit bar.
43+ - Code line numbers went from 40% to 55%. They were 3.4:1.
44+ - Dark mode is untouched.
45+ - The search input has aria-label and starts with aria-expanded=false, which its combobox role requires.
46+ - The 'N commits' link on project pages is underlined. It only differed from the text around it by colour.
47+ - The /projects slider inputs are 24px tall, up from 20px, the minimum target size.
48+
49+ From the web.dev article (agent-friendly sites): the site already uses semantic links, buttons and forms, cursor:pointer, and stable layouts. The search input now has a name, and the dropdown is a proper combobox and listbox. I didn't do WebMCP, which the article calls experimental.
50+
51+ Not done: code line-number links stay 20px tall (target-size on file pages). Making them 24px would loosen every code view. No dark-mode audit, since 1039 is about dark colours. No canonical links. No schema.org data.