fix: align website shell and docs layout#12
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the website’s layout composition so both marketing and documentation routes share a single site shell (header/main/footer), aligning Askr’s structure with the shared layout model used by cntryl/website while preserving existing routes and catalog-driven docs behavior.
Changes:
- Introduces a shared
SiteLayoutplus shared header/footer components, moving docs search into the global navbar. - Refactors docs pages to render sidebar/content/TOC inside the shared shell using
SidebarScope/SidebarInset, with updated layout CSS. - Routes
/docsthrough the marketing-style shell and updates static verification expectations for the new layout boundaries.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/styles.css | Adds shared shell and updated docs layout CSS selectors for the new structure. |
| src/pages/site-layout.tsx | Introduces the shared SiteLayout wrapper (ThemeScope + header/main/footer). |
| src/pages/site-header.tsx | Adds shared header with brand, global docs search, GitHub link, and theme toggle. |
| src/pages/site-footer.tsx | Adds shared footer to be used across marketing and docs routes. |
| src/pages/marketing/_layout.tsx | Switches marketing layout to the new shared SiteLayout. |
| src/pages/docs/_layout.tsx | Refactors docs chrome to use SidebarScope/SidebarInset inside the shared shell. |
| src/pages/_routes.tsx | Routes /docs through the marketing layout and excludes it from the docs-layout group. |
| scripts/verify-static-output.ts | Updates static verification to treat /docs as marketing layout and adjusts docs markers. |
Comments suppressed due to low confidence (3)
src/pages/docs/_layout.tsx:79
- Elements returned from Array.from(subsections).map are missing a key. Add a stable key (label) to the subsection wrapper.
<div>
src/pages/docs/_layout.tsx:85
- Elements returned from pages.map are missing a key. Add key={page.route} to SidebarMenuItem so navigation items reconcile correctly.
<SidebarMenuItem>
src/pages/docs/_layout.tsx:133
- Elements returned from headings.map are missing a key. Use heading.id as the list key to ensure stable reconciliation and avoid warnings.
<li>
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| asChild | ||
| active={page.route === activePath} | ||
| size="sm" | ||
| <SidebarGroup data-nav-section={section.id}> |
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.
Closes #11
Summary
Align the Askr website shell and documentation layout with the shared structure used by
cntryl/website./docsthrough the shared marketing-style shell.SidebarScope/SidebarInsetand theme off-canvas navigation./docsand docs-shell boundaries.Verification
npm run check✅/,/docs/, representative docs/API routes, and/404/✅