Skip to content

feat(site)!: minimal static templates for reference pages#30

Merged
maehr merged 1 commit into
textrefs:stagingfrom
maehr:feat/slim-ref-pages
Jul 6, 2026
Merged

feat(site)!: minimal static templates for reference pages#30
maehr merged 1 commit into
textrefs:stagingfrom
maehr:feat/slim-ref-pages

Conversation

@maehr

@maehr maehr commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

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).

  • New 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 (+ noindex for 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.
  • Dropped: citation copy/download buttons and their per-page inline script + embedded CSL JSON (the .json sibling carries the data).
  • Work/system/mapping pages (46 records) keep the full Starlight chrome.

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+json alternate link, draft banner, shared CSS, COinS all present.

Part of the v0.1.0 release train.

🤖 Generated with Claude Code

/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>
Copilot AI review requested due to automatic review settings July 6, 2026 06:12
@maehr maehr merged commit 238490e into textrefs:staging Jul 6, 2026
2 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 RecordPage layout 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.css to 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 thread public/assets/record.css
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants