Skip to content

feat(site): adopt the noctcore theme with the nocturne preset and redesign rule pages - #52

Merged
Shironex merged 10 commits into
mainfrom
feat/site-nocturne
Sep 27, 2026
Merged

Shironex merged 10 commits into
mainfrom
feat/site-nocturne

Conversation

@Shironex

Copy link
Copy Markdown
Contributor

Summary

The docs site moves onto the noctcore theme's token system with the Nocturne preset (the current night-sky look, refined), and the rule pages, the rule index and the package cards get a redesign. The showcase-kit site uses the sibling Observatory preset from the same token contract (noctcore/showcase-kit#8).

Merge #51 first: this branch contains its bun 1.4.2 commit, so this diff shrinks to the site once that lands.

  • Theme (site/src/styles/noctcore/): base.css maps the --nc-* tokens onto Starlight's variables once, components.css holds the shared pieces, and presets/nocturne.css sets the tokens for dark and light and imports its own fonts (Space Grotesk and JetBrains Mono, already self-hosted). site.css keeps this site's own rules. Expressive Code gets Nocturne's code colours, and the existing verdict plugin stays.
  • Titles: the site title reads noctcore / ESLint plugins, and a rule's title splits into a quiet namespace (noctcore-contracts/) over the rule name.
  • Rule pages: the doc's blockquote becomes the lead paragraph. The old metadata line becomes a facts strip, the same cells in the same place on every page:
    • an ESLint rule: package and version, recommended preset, autofix, suggestions, options, type information;
    • a lint-meta rule: its factory, entry point and category.
      The Incorrect and Correct frames get a tinted title bar, a coloured edge and a cross or tick, using the existing verdict-* classes.
  • All rules and the package tables: summary numbers over the index and a heading row per package. Text badges replace the emoji, with opt-in and "needs options" markers. Below phone width, rows stack into labelled entries. rules.json and llms.txt keep their shape.
  • Package cards: short name, version, and a bar for the rules on, off and left out of the preset.
  • Landing: "Yes, if" and "Probably not, if" side by side, with layout wrappers only and no prose change.
  • Telemetry: every astro script sets ASTRO_TELEMETRY_DISABLED=1, because Astro only skips its usage telemetry on CI.
  • Tests: a token contract test (the preset sets every token the theme reads, in dark and light) and a facts-strip test.
  • CONTRIBUTING: now describes the facts strip.

A fix worth knowing: Starlight's Markdown content puts a top margin between sibling elements, which broke the grid pieces. Their cells reset it in components.css.

Test plan

  • bun install --frozen-lockfile, bun run build, bun run typecheck, bun run test (ESLint 10 and 9)
  • bun run docs:build: 130 pages, 113 rule pages for 113 docs, 18575 root-relative links, rules.json 113 entries with 113 URLs
  • bun run --cwd site test (40 pass); bun run docs:readmes leaves the tree unchanged
  • 5 mutation checks went red: a token removed from the preset in dark and in light (contract test), the opt-in marker on a deprecated rule, a negative facts cell without its quiet style, and the blockquote emitted instead of the lead
  • Contrast on the built pages (computed colours, WCAG formula): lowest text pair 5.64:1 dark and 4.97:1 light; frame edges and focus 3:1 or better; no horizontal scroll at 390 px
  • Screenshots of the splash, getting started, a rule page, the all-rules index and a package page in dark and light at 1440 and 390 px
  • After merge: the deployed site renders the same

Pin packageManager, the four setup-bun steps and the CONTRIBUTING requirement to 1.4.2. bun 1.4.2 reads and keeps the v1 text lockfile; the only lockfile change is the workspace version fields it syncs from package.json, with no resolution change.
Astro only skips its usage telemetry on CI. Set ASTRO_TELEMETRY_DISABLED=1 on each astro invocation so local dev, build, preview and sync send nothing too. bun runs scripts through its own shell on Windows, so the prefix works there.
Replace theme.css with the noctcore docs theme (base.css, components.css and presets/nocturne.css, in that load order) plus site.css for what the theme does not cover. The preset imports its own fonts, so the Head override that only loaded them goes. Expressive Code takes Nocturne's code themes and keeps the verdict plugin.
Every --nc-* token base.css and components.css read must be set by the preset for dark and for light; a missing one resolves to nothing and fails no build.
The site title reads as the noctcore wordmark over its crescent rule, then the product; on a phone only the product. A rule page title shows its namespace, quiet, over the rule name.
sync.ts writes the doc's summary as the page lead and replaces the one-line metadata with a six-cell facts strip (package, preset, autofix, suggestions, options, type information; harness cells for lint-meta rules), plus a status cell on a deprecated rule. The readmes and deprecation tests pinned the old line and now check the strip.
…le tables

Rows carry data-label so they stack at phone width, the emoji become text badges with the opt-in and needs-options markers, the all-rules index opens with summary numbers and a heading row per package, and a rule id splits into namespace over name inside one code element.
Each card leads with the short name and version and shows how its rules split across the recommended preset, as a bar and in words.
Wrap the landing page's Yes, if and Probably not, if paragraphs in the fit pair. The prose is unchanged.
@Shironex Shironex added enhancement New feature or request site The docs site under site/ and its build checks labels Sep 27, 2026
@Shironex
Shironex merged commit 9a3b712 into main Sep 27, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request site The docs site under site/ and its build checks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant