feat: landing page support, edit-this-page links, and body font-weight fix#26
Merged
Merged
Conversation
Deploying capsa with
|
| Latest commit: |
d30ce0f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://7c4edf5e.capsa-6ct.pages.dev |
| Branch Preview URL: | https://feat-home-page-and-github-ed.capsa-6ct.pages.dev |
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
Two features that close the remaining gaps vs Docusaurus, plus a site-wide font fix they surfaced.
Landing page (
content/home.mdx) — presence-gated: drop the file in and/renders aprerendered landing page (TopNav + footer, no sidebar); delete it and
/redirects to/docsas before. Ships four MDX components (
Hero,FeatureGrid,Feature,LinkButton— all realcrawlable anchors), a demo home page for this repo, and full pipeline integration:
homeis a reserved slug — excluded from sidebar/search/manifest/llms.txt, butprerendered with its own OG card and a
/sitemap entry.dist/index.html, which doubles as the SPA fallback fornon-prerendered URLs. Every prerendered page therefore carries a
<meta name="capsa-prerendered">route marker; the client hydrates only on a marker matchand falls back to a clean client render otherwise (404s and
/docs/apicovered by e2e)./with a landing page,/docswithout) — SPA-fast, cmd-clickable.Edit this page — every doc links to
GITHUB_URL/edit/<branch>/content/<slug>.mdxin twoplaces: a PageActions menu item and a visible link below the article. New optional
VITE_GITHUB_BRANCH(defaultmain).Fix: body text rendered bold site-wide — Tamagui resolves font weight from the
size-matched key in the font config (
fontSize="$5"→weight['5']), and the map escalatedwith size, so every 16px+ paragraph rendered at weight 700. The weight map is now flat 400 at
every size; headings keep their explicit weights. Also adds a
bodyfont-family fallback sostray text nodes never fall to serif.
Type of change
Checklist
pnpm typecheckpassespnpm lintpassespnpm format:checkpasses (runpnpm formatto fix)pnpm buildsucceedspnpm check:linkspassesNotes
hosts (previously the empty shell). Head meta is identical (site defaults) and the route
marker guarantees a clean client render — no user-visible change, but worth knowing when
debugging view-source.
don't tune themes against the old bold rendering.
exclusion, edit links + brand-home navigation).
PRERENDER=0rollback re-verified..env.exampleupdated.