• English
  • Pages tree & dynamic routes

    Complete file list

    pages/[locale]/ contains 22 files, grouped by responsibility:

    Entry and aggregation

    FileURLDescription
    index.tsx/{locale}HUD home with five primary navigation columns
    content.tsx/{locale}/contentContent aggregation with hash sections (#works #experience #blog #life)

    Section pages

    FileURLDescription
    works.tsx/{locale}/worksWorks list
    experience.tsx/{locale}/experienceExperience timeline
    life.tsx/{locale}/lifeLife records (game / travel / other)
    friends.tsx/{locale}/friendsFriend links plus acknowledgements
    about.tsx/{locale}/aboutAbout
    contact.tsx/{locale}/contactContact (social links and email)
    tweets.tsx/{locale}/tweetsTweet archive with month pagination
    copyright.tsx/{locale}/copyrightLicense and copyright

    Detail pages

    FileURLDescription
    web/[id].tsx/{locale}/web/{id}Work detail; SSG with getStaticPaths covering data/projects
    life/[slug].tsx/{locale}/life/{slug}Life detail; SSG covering data/life
    blog/[slug].tsx/{locale}/blog/{slug}Blog detail; SSG with fallback: 'blocking' plus ISR

    Redirects

    FileBehavior
    blog.tsxTemporary alias → /{locale}/content#blog
    posts.tsxLegacy redirect → /{locale}/content#blog
    posts/[slug].tsxLegacy redirect → /{locale}/blog/{slug}
    license.tsxPermanent redirect → /{locale}/copyright

    Note: /[locale]/game does not exist. useLayoutRouteMode and prefetch matchers still include it as a standalone-pattern branch, but there is no pages/[locale]/game file. This is the "legacy matcher" recorded as GOTCHAS.md item 21.

    Protected and feed

    FileURLDescription
    access/[group].tsx/{locale}/access/{group}TOTP gate page
    rss.xml.tsx/{locale}/rss.xmlPer-locale RSS

    getStaticPaths behavior

    • web/[id].tsx: paths flattens the three groups (web / game / early) from data/projects for the active locale. fallback: false.
    • life/[slug].tsx: paths flattens data/life (gameData / travelData / otherData) for the active locale. fallback: false.
    • blog/[slug].tsx: paths pulls the slug list from blog-index.json (when the external content repo is configured) or falls back to the bundled content/blog/init/ posts. fallback: 'blocking' allows new slugs to be rendered on demand and then cached via ISR.

    State and layout contexts

    Several contexts sit alongside routes-and-proxy:

    • contexts/AppContext.tsx — site-wide interactive state: loading sequence, power/battery/inversion, real-time stats, home-page typing effects, column hover state.
    • contexts/TransitionContext.tsx — controls route transition animations. All internal navigation must use useTransition().navigateTo(url), never router.push(). Supports setBackOverride() so detail views and lightboxes can intercept BACK behavior.
    • contexts/LayoutAnchorsContext.tsx — registers the active scroll container. The layout uses a locked-height content container, so deep-link scrolling must target that container instead of the document viewport.
    • contexts/SiteAssetsContext.tsx — exposes resolved site-shell assets (favicon, og:image, avatar).

    Route loading overlay

    useRouteLoadingKind(router) decides the loading overlay variant from the leaving path, not the target:

    • home/content → blog detail: default right-side overlay; left HUD stays visible
    • blog detail → blog detail: standalone overlay; left HUD is already hidden

    Do not flip this to target-based selection — it breaks one of the two directions. This is GOTCHAS.md item 7.