From 30b2ace966f92432b4a3d3282a118e502a335db6 Mon Sep 17 00:00:00 2001 From: Ryan Malloy Date: Tue, 24 Feb 2026 13:36:43 -0700 Subject: [PATCH] Fix Lighthouse audit findings: contrast, cache, robots.txt - Card link color bumped to accent-high for WCAG AA contrast ratio - Caddyfile: immutable cache headers for hashed _astro/* assets - robots.txt: move LLMs-Txt to comments (not a standard directive) --- docs/Caddyfile.prod | 8 ++++++++ docs/public/robots.txt | 6 ++++-- docs/src/styles/custom.css | 4 ++-- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/docs/Caddyfile.prod b/docs/Caddyfile.prod index f9b0754..da23620 100644 --- a/docs/Caddyfile.prod +++ b/docs/Caddyfile.prod @@ -1,6 +1,14 @@ :4321 { encode gzip + # Hashed assets — immutable, cache forever + @hashed path /_astro/* + header @hashed Cache-Control "public, max-age=31536000, immutable" + + # OG images — content-hashed filenames aren't used, cache 1 day + @og path /og/* + header @og Cache-Control "public, max-age=86400" + handle { root * /usr/share/caddy try_files {path} {path}/index.html diff --git a/docs/public/robots.txt b/docs/public/robots.txt index 335fc3e..a5443f0 100644 --- a/docs/public/robots.txt +++ b/docs/public/robots.txt @@ -3,5 +3,7 @@ Allow: / Sitemap: https://mcnoaa-tides.warehack.ing/sitemap-index.xml -# LLM documentation — https://llmstxt.org/ -LLMs-Txt: https://mcnoaa-tides.warehack.ing/llms.txt +# LLM-readable documentation: https://llmstxt.org/ +# Full docs: https://mcnoaa-tides.warehack.ing/llms-full.txt +# Abridged docs: https://mcnoaa-tides.warehack.ing/llms-small.txt +# Overview: https://mcnoaa-tides.warehack.ing/llms.txt diff --git a/docs/src/styles/custom.css b/docs/src/styles/custom.css index 7dfd2c9..52f889f 100644 --- a/docs/src/styles/custom.css +++ b/docs/src/styles/custom.css @@ -177,13 +177,13 @@ nav.sidebar .top-level > li > a { border: none !important; font-size: 0.85rem; font-weight: 600; - color: var(--sl-color-accent) !important; + color: var(--sl-color-accent-high) !important; text-decoration: none; transition: color 0.15s ease; } [data-has-hero] .sl-markdown-content article.card a[href]:hover { - color: var(--sl-color-accent-high) !important; + color: var(--sl-color-white) !important; } /* Install section: center the install block */