Feature/syncdeck permalinks - #8
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.