Skip to content

Feature/syncdeck permalinks - #8

Merged
mrbdahlem merged 4 commits into
mainfrom
feature/syncdeck-permalinks
Jul 26, 2026
Merged

Feature/syncdeck permalinks#8
mrbdahlem merged 4 commits into
mainfrom
feature/syncdeck-permalinks

Conversation

@mrbdahlem

Copy link
Copy Markdown
Contributor

No description provided.

Deck URLs currently break on reorganization since they're just the
file path. This plan adds a generated, stable per-deck permalink
(meta tag + committed manifest) that survives moves/renames.
Deck URLs today are just the file path, so reorganizing folders breaks
any link built on them. Adds scripts/generate-permalink.mjs (assigns a
per-deck hash, stored in a meta tag, with a committed manifest for
collision detection), scripts/generate-permalink-redirects.mjs (emits
a /p/<hash>.html redirect stub per deck at build time), and wires both
into static.yml plus a new pull_request-triggered permalinks-check.yml
so a missing/stale permalink fails CI. Also teaches the local dev
server to resolve permalinks the same way the production build does.
Ran scripts/generate-permalink.mjs --all once so every current
presentation has a stable permalink from day one, matching the
manifest committed in the previous commit.
Renames the old "Get permalink" action to "Syncdeck link" for clarity
now that there are two kinds of permalink, and routes it through our
own stable /p/<hash>.html link (rather than the raw, reorg-fragile
deck path) when one exists. Moves the raw-URL copy button next to the
deck title to reduce clutter, and adds a single labeled "Permalink"
copy button in the right-aligned actions for the new short link.
Documents the new system in CLAUDE.md with a new-deck step.
@mrbdahlem
mrbdahlem merged commit 09bf91f into main Jul 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant