feat(site)!: minimal static templates for reference pages#30
Merged
Conversation
/id/ref/{uuid}/ pages drop the Starlight chrome for a bare document
(src/layouts/RecordPage.astro) with one shared stylesheet served
unbundled at /assets/record.css: 40.7 KB -> 3.3 KB per page, site
1.9 GB -> 270 MB, back under the GitHub Pages 1 GB limit that made
staging deploys fail in syncing_files.
Content parity is kept: status tags, IRI, JSON link, draft/tombstone
banner (noindex for drafts), work/system context, Chicago citation with
COinS span for reference managers, aliases, resolver targets by
language. Dropped: copy/download citation buttons and their per-page
inline script + CSL blob (the .json sibling carries the data).
Work/system/mapping pages (46 records) keep Starlight.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR reduces the generated site size for GitHub Pages by switching high-volume /id/ref/{uuid}/ pages to a minimal standalone HTML layout with a shared, unbundled stylesheet, while keeping richer Starlight chrome for lower-volume record pages.
Changes:
- Replaced Starlight-based reference record pages with a new minimal
RecordPagelayout and in-page equivalents for tombstone/draft banners, citation, aliases, and resolver targets. - Added a dedicated minimal layout (
src/layouts/RecordPage.astro) to render bare HTML documents and link shared assets (JSON-LD alternate + shared CSS). - Introduced a shared static stylesheet at
public/assets/record.cssto avoid per-page style/script weight on ~39k pages.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/pages/id/ref/[uuid]/index.astro | Ref page switched from Starlight + components to the new minimal RecordPage layout and inline minimal content rendering. |
| src/layouts/RecordPage.astro | New standalone HTML document layout for record pages, linking shared CSS and JSON-LD alternate. |
| public/assets/record.css | New shared stylesheet for minimal record pages to avoid per-page inlining/bundling. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+4
to
+23
| :root { | ||
| --fg: #1c1e21; | ||
| --fg-muted: #59636e; | ||
| --bg: #ffffff; | ||
| --bg-code: #f0f1f2; | ||
| --hairline: #d9dde1; | ||
| --accent: #3b5bdb; | ||
| --warn: #d97706; | ||
| --info: #2563eb; | ||
| } | ||
| @media (prefers-color-scheme: dark) { | ||
| :root { | ||
| --fg: #e6e8ea; | ||
| --fg-muted: #9aa4af; | ||
| --bg: #17181c; | ||
| --bg-code: #24262c; | ||
| --hairline: #3a3d45; | ||
| --accent: #8da2fb; | ||
| } | ||
| } |
Comment on lines
+29
to
+34
| <header class="site-header"> | ||
| <a href="/">TextRefs</a> | ||
| <span class="note"> | ||
| Unstable preview — the standard and registry are pre-release drafts. | ||
| </span> | ||
| </header> |
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.
Fixes the reproducible GitHub Pages deploy failure (
syncing_files→ "Deployment failed"): the site was ~1.9 GB vs. Pages' 1 GB limit, and 1.6 GB of it was Starlight chrome on the 39,204/id/ref/{uuid}/pages (40.7 KB each).src/layouts/RecordPage.astro: bare document, no Starlight, one shared stylesheet served unbundled at/assets/record.css(cached across all pages, never inlined)./id/ref/{uuid}/rewritten on the minimal layout with content parity: status tags, IRI, JSON link, draft/tombstone banner (+noindexfor drafts), work/system context, Chicago citation with COinS span for reference managers, aliases, resolver targets by language. Fully readable without JavaScript — fitting for persistent-identifier pages..jsonsibling carries the data).Measured: 3.3 KB avg per ref page (was 40.7 KB); site total 270 MB (was 1.9 GB); build time 3.5 min → 1m22s. Verified in dist:
noindex,application/ld+jsonalternate link, draft banner, shared CSS, COinS all present.Part of the v0.1.0 release train.
🤖 Generated with Claude Code