Commit Graph

29 Commits

Author SHA1 Message Date
svemagie
93972aef35 fix: persist OG image cache outside act runner workspace
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 1m51s
The cache was written to .cache/og/ relative to the workspace, which is
under /usr/local/git/.cache/act/<unique-hash>/hostexecutor/ — a new path
per run, so every build regenerated all images from scratch.

OG_CACHE_DIR env var now controls the cache path (resolved to an absolute
path). CI sets it to /usr/local/git/.cache/og, which survives between runs.
Locally it still defaults to .cache/og inside the project dir.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-01 10:00:53 +02:00
svemagie
e80b99ce49 fix: resvg og image generation
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 1m44s
2026-03-31 21:25:38 +02:00
svemagie
dbcbdf4c57 debug resvg cli
Some checks failed
Build & Deploy / build-and-deploy (push) Has been cancelled
2026-03-31 21:21:52 +02:00
svemagie
fec9628c38 debug resvg cli
Some checks failed
Build & Deploy / build-and-deploy (push) Has been cancelled
2026-03-31 21:05:26 +02:00
svemagie
9ce9f4aa09 debug resvg cli
Some checks failed
Build & Deploy / build-and-deploy (push) Failing after 18s
2026-03-31 21:03:04 +02:00
svemagie
79bf98387a debug resvg cli
Some checks failed
Build & Deploy / build-and-deploy (push) Failing after 20s
2026-03-31 21:00:38 +02:00
svemagie
ddbba1bfcd fix: logging for resvg
Some checks failed
Build & Deploy / build-and-deploy (push) Has been cancelled
2026-03-31 20:55:47 +02:00
svemagie
3f6d499081 fix: resvg cli
Some checks failed
Build & Deploy / build-and-deploy (push) Has been cancelled
2026-03-31 20:46:45 +02:00
svemagie
2b9e425c98 fix: og image with resvg client
Some checks failed
Build & Deploy / build-and-deploy (push) Failing after 20s
2026-03-31 20:45:13 +02:00
svemagie
ba9e64ae9e fix: og image fixes
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 1m16s
2026-03-31 19:24:58 +02:00
svemagie
c40456bcae fix: og-image got lost ... again
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 1m15s
2026-03-31 19:16:45 +02:00
svemagie
219c18138c fix(og): match plain URL slugs; fix Funkwhale GC wipe
All checks were successful
Build & Deploy / build-and-deploy (push) Successful in 1m19s
og-fix transform was matching date-based URL segments
(/type/yyyy/MM/dd/slug/) that this site never uses — posts live at
/type/slug/. Every post therefore fell through to the default OG image.

Fixed by updating the regex to /type/slug/index.html and deriving the OG
slug as the bare last URL segment, which matches the filename og.js
already generates. The ogSlug filter is simplified accordingly.

Funkwhale GC bug: gcFunkwhaleImages() deleted the entire image cache
whenever _activeFilenames was empty — which happens if the API returns
valid stats but no listenings with cover URLs. Guard added: GC is
skipped when no images were referenced this build.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-31 14:04:34 +02:00
svemagie
796318e161 feat(listening): cache Funkwhale cover images locally at build time
Wasabi S3 presigned URLs expire after 1 hour, causing broken images on
the listening page. Download cover art at build time, serve from
/images/funkwhale-cache/, and GC any images no longer referenced by
current listening/favorites data.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 07:01:54 +01:00
svemagie
f6f7cac403 fix: harden unfurl timeout + persist CI fetch cache
- Add hard 22s Promise.race deadline in prefetchUrl() to guard against
  TCP-level connection hangs that bypass unfurl.js's read-only timeout.
  Fixes builds hanging indefinitely on unresponsive hosts.

- Add actions/cache step to deploy.yml persisting .cache/ between runs.
  Prevents webmention (and all eleventy-fetch) data loss on transient
  502s: a populated cache means failures return existing data, not [].

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 22:28:40 +01:00
svemagie
ce4ff57319 fix: smaller profile pic 2026-03-17 08:43:34 +01:00
svemagie
41999765cf fix(og): use cy-me2.webp as avatar for OG image generation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-16 00:02:04 +01:00
svemagie
a166af2306 chore: sync upstream — performance, webmentions v2, OG v3
- _data: switch to cachedFetch wrapper (10s timeout + 4h watch cache)
- js/webmentions.js: owner reply threading, platform provenance badges, DOM dedup, Micropub reply support
- js/comments.js: owner detection, reply system, Alpine.store integration
- _includes/components/webmentions.njk: data-wm-* attrs, provenance badge slots, reply buttons
- _includes/components/comments.njk: owner-aware comment form, threaded replies
- widgets/toc.njk: Alpine.js tocScanner upgrade (replaces is-land/inline-JS)
- lib/og.js + og-cli.js: OG card v3 (light theme, avatar, batched spawn, DESIGN_VERSION=3)
- eleventy.config.js: hasOgImage cache, memoized date filters, batched OG/unfurl, post-build GC, YouTube check opt
- base.njk: Inter font preloads + toc-scanner.js script
- critical.css: font-face declarations (font-display:optional)
- tailwind.css: font-display swap→optional
- tailwind.config.js: prose link colors -700→-600
- Color design system: accent-700/300 → accent-600/400 across components

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 23:56:56 +01:00
svemagie
ac4b62d43c chore: sync upstream — add toc-scanner.js and data-fetch.js
New files from rmdes/indiekit-eleventy-theme:
- js/toc-scanner.js: Alpine.js TOC scanner with IntersectionObserver scroll spy
- lib/data-fetch.js: shared fetch helper with 10s timeout and watch-mode cache extension

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 23:15:33 +01:00
Ricardo
6ff40c8317 perf: address PageSpeed Insights issues (CLS, contrast, touch targets, JS minification)
- Reserve sidebar min-height on desktop to prevent CLS from Alpine.js hydration
- Defer lite-yt-embed.css with media="print" onload pattern
- Add terser JS minification in eleventy.after build hook
- Increase touch target sizing for category pills, facepile avatars, nav items
- Fix text-surface-400 contrast ratio (3.05:1 → 6.23:1) across 20 instances

Confab-Link: http://localhost:8080/sessions/edb1b7b0-da66-4486-bd9c-d1cfa7553b88
2026-03-07 20:13:45 +01:00
Ricardo
e236b4bf65 a11y: comprehensive WCAG 2.1 Level AA accessibility audit
- Add skip-to-main-content link and main content ID target
- Add prefers-reduced-motion media queries for all animations
- Enhance visible focus indicators (2px offset, high-contrast ring)
- Replace ~160 text-surface-500 instances with text-surface-600/dark:text-surface-400
  for 4.5:1+ contrast ratio compliance
- Add aria-hidden="true" to ~30+ decorative SVG icons across sidebars/widgets
- Convert facepile containers from div to semantic ul/li with role="list"
- Add aria-label to icon-only buttons (share, sort controls)
- Add sr-only labels to form inputs (webmention, search)
- Add aria-live="polite" to dynamically loaded webmentions
- Add aria-label with relative+absolute date to time-difference component
- Add keyboard handlers (Enter/Space) to custom interactive elements
- Add aria-label to nav landmarks (table of contents)
- Fix modal focus trap and dialog accessibility
- Fix lightbox keyboard navigation and screen reader announcements

Confab-Link: http://localhost:8080/sessions/edb1b7b0-da66-4486-bd9c-d1cfa7553b88
2026-03-07 18:58:08 +01:00
Ricardo
155816a0bc feat: replace all primary (blue) with contextual colors across entire theme
Eliminate monotonous blue by replacing ~290 primary- references in 60 files
with semantically appropriate colors:

- accent (teal): links, CTAs, buttons, tabs, focus rings, spinners
- purple: Funkwhale/music, photos, Mastodon/fediverse
- surface (neutral): GitHub, dates/metadata, info boxes
- amber: bookmarks, blogroll categories
- red: likes
- green: reposts
- sky: replies
- orange: RSS/feeds, podcasts
- #0085ff: Bluesky brand
- #a730b8: Mastodon brand

Also updates prose link colors in tailwind.config.js, pagefind UI
primary color to teal, and client-side JS color references.

Confab-Link: http://localhost:8080/sessions/bd3f7012-c703-47e9-bfe2-2ad04ce1842d
2026-03-04 12:50:19 +01:00
Ricardo
36f17d1a1f feat: add unfurl cards to blog page and homepage recent posts
Use two-strategy approach to work around async shortcode limitation
in deeply nested Nunjucks includes:

- blog.njk: async {% unfurl %} shortcode (top-level, works fine)
- recent-posts.njk: sync {{ url | unfurlCard | safe }} filter
  (reads from pre-populated disk cache)

eleventy.before hook scans content files and pre-fetches all
interaction URLs before templates render, ensuring the sync filter
always has data — even on first build.
2026-02-20 16:10:25 +01:00
Ricardo
41c7fae2f1 fix: use proper User-Agent for unfurl requests
The default facebookexternalhit UA causes many sites to block or
redirect-loop, resulting in timeouts. Switch to a well-identified
bot UA that sites handle correctly.
2026-02-20 12:31:42 +01:00
Ricardo
e0cbf8121e fix: unfurl shortcode concurrency control and failure caching
- Increase timeout from 10s to 20s
- Cache failures for 1 day (avoids retrying every build)
- Add concurrency limiter (max 5 parallel requests)
- Refactor into renderCard/renderFallbackLink helpers
2026-02-20 12:20:28 +01:00
Ricardo
897daca686 feat: add unfurl shortcode for rich link preview cards
Adds {% unfurl "URL" %} shortcode that renders any URL as a rich card
with OpenGraph metadata (title, description, image, favicon). Uses
unfurl.js locally — no external API dependency. Results cached for 1
week in .cache/unfurl/. Also fixes Mastodon embed server config
(mstdn.social → indieweb.social).
2026-02-20 11:29:11 +01:00
Ricardo
b065dbfed7 fix: use full date-prefixed filenames for OG images
The Nunjucks race condition in Eleventy 3.x affects page.url too —
its value changes between {% set %} and {{ }} within the same
template render during parallel builds. Instead of trying to derive
slugs from page data, name OG images with the full filename
(including date prefix) to match URL path segments exactly.
2026-02-18 17:08:05 +01:00
Ricardo
8503237d4d fix(og): match Eleventy's page.fileSlug by stripping date prefix
Eleventy v3 parses YYYY-MM-DD- from filenames and removes it from
page.fileSlug. The OG generator was using the full filename (with
date prefix) causing a slug mismatch — hasOgImage filter checked
for 'slug.png' while the file was 'YYYY-MM-DD-slug.png'.

Also removes debug logging from hasOgImage filter.
2026-02-18 09:42:10 +01:00
Ricardo
86cbc1ee5d fix: run OG image generation in subprocess to prevent OOM kill
The OG generation in the eleventy.before hook consumed too much memory
alongside Eleventy's data cascade, causing the Eleventy process to be
OOM-killed on Cloudron. Fix by running OG generation in a separate
child process with its own 768MB heap limit. Also write the manifest
incrementally (every 10 images) to preserve progress if interrupted.
2026-02-18 08:49:23 +01:00
Ricardo
fe06fe3f4f feat: auto-generate OpenGraph images for posts without photos
Uses Satori + @resvg/resvg-js to create branded 1200x630 social
preview cards at build time. Cards show post title, type badge,
date, and site name on a dark background with blue accent.

Generated images are cached in .cache/og/ (persistent on Cloudron)
and passthrough-copied to the output. Posts with photos continue
using their own images. Untitled posts (notes) use body text.
2026-02-18 08:37:50 +01:00