feat(docs): 677 — demo page for custom path atoms (yyyy-mm-dd, name.ext) - #97
Open
randomdevpete wants to merge 1 commit into
Conversation
Adds /demos/complex-routing: routeAtom-built single-segment atoms for a yyyy-mm-dd archive date (gated on the real calendar with validateAtom) and a name.ext filename. Ticket: 677
randomdevpete
changed the base branch from
task-676-demo-page-cancel-navigation-dirty-edits
to
task-679-investigate-per-demo-scoped-store-context
August 21, 2026 03:37
randomdevpete
force-pushed
the
task-677-complex-routing-demo-custom-path-atoms
branch
from
August 21, 2026 03:37
099b87a to
ad941aa
Compare
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.
Summary
Adds a new
/demos/complex-routingpage demonstrating custom single-segment path atoms built directly onrouteAtom(notstaticRouteAtom/paramRouteAtom):yyyy-mm-ddarchive-date segment parsed to{year, month, day}and validated against real calendar dates viavalidateAtom, showing a valid leap-year date (2024-02-29) and an invalid one (2023-02-29) to demonstrate validation rejection.name.extfilename segment parsed to{name, ext}, including a file with a dot in the base name to show the regex correctly splits only on the last dot.Implementation
Both custom atoms are self-contained factories demonstrating the pattern for single-segment parsing. Registry edits (
routes.ts) are purely additive, allowing ticket 678 to stack cleanly. SSG/SSR paths only include valid calendar dates to ensure the build succeeds.Notes
One exception to CODING-STYLE.md section 2:
dateSegmentRouteAtomhas a multi-line docblock despite being an internal function. This is justified as teaching material on a public docs site where clarity warrants the exception.Stacked on PR #96 (
task-676-demo-page-cancel-navigation-dirty-edits).