30 Commits

Author SHA1 Message Date
52cb73be47 Merge pull request #33 from jimeh/dependabot/npm_and_yarn/tar-7.5.9
Bump tar from 7.5.3 to 7.5.9
2026-02-19 00:33:49 +00:00
dependabot[bot]
3e689ed0b2 Bump tar from 7.5.3 to 7.5.9
Bumps [tar](https://github.com/isaacs/node-tar) from 7.5.3 to 7.5.9.
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v7.5.3...v7.5.9)

---
updated-dependencies:
- dependency-name: tar
  dependency-version: 7.5.9
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-19 00:32:03 +00:00
5d7068ae1d Merge pull request #34 from jimeh/dependabot/npm_and_yarn/npm-development-ad1342459c
Bump the npm-development group across 1 directory with 7 updates
2026-02-19 00:30:52 +00:00
dependabot[bot]
201700f27b Bump the npm-development group across 1 directory with 7 updates
Bumps the npm-development group with 6 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) | `9.39.2` | `10.0.1` |
| [@tailwindcss/vite](https://github.com/tailwindlabs/tailwindcss/tree/HEAD/packages/@tailwindcss-vite) | `4.1.18` | `4.2.0` |
| [eslint](https://github.com/eslint/eslint) | `9.39.2` | `10.0.0` |
| [eslint-plugin-astro](https://github.com/ota-meshi/eslint-plugin-astro) | `1.5.0` | `1.6.0` |
| [prettier](https://github.com/prettier/prettier) | `3.7.4` | `3.8.1` |
| [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) | `8.53.0` | `8.56.0` |



Updates `@eslint/js` from 9.39.2 to 10.0.1
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/commits/HEAD/packages/js)

Updates `@tailwindcss/vite` from 4.1.18 to 4.2.0
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/commits/v4.2.0/packages/@tailwindcss-vite)

Updates `eslint` from 9.39.2 to 10.0.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v9.39.2...v10.0.0)

Updates `eslint-plugin-astro` from 1.5.0 to 1.6.0
- [Release notes](https://github.com/ota-meshi/eslint-plugin-astro/releases)
- [Changelog](https://github.com/ota-meshi/eslint-plugin-astro/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ota-meshi/eslint-plugin-astro/compare/v1.5.0...v1.6.0)

Updates `prettier` from 3.7.4 to 3.8.1
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.7.4...3.8.1)

Updates `tailwindcss` from 4.1.18 to 4.2.0
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/commits/v4.2.0/packages/tailwindcss)

Updates `typescript-eslint` from 8.53.0 to 8.56.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.56.0/packages/typescript-eslint)

---
updated-dependencies:
- dependency-name: "@eslint/js"
  dependency-version: 10.0.1
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: npm-development
- dependency-name: "@tailwindcss/vite"
  dependency-version: 4.2.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-development
- dependency-name: eslint
  dependency-version: 10.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: npm-development
- dependency-name: eslint-plugin-astro
  dependency-version: 1.6.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-development
- dependency-name: prettier
  dependency-version: 3.8.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-development
- dependency-name: tailwindcss
  dependency-version: 4.2.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-development
- dependency-name: typescript-eslint
  dependency-version: 8.56.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-development
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-19 00:29:42 +00:00
540efeac89 Merge pull request #26 from jimeh/dependabot/npm_and_yarn/tar-7.5.7
Bump tar from 7.5.3 to 7.5.7
2026-02-19 00:28:36 +00:00
0ff81cccbd Merge pull request #29 from jimeh/dependabot/github_actions/actions/setup-node-6.2.0
Bump actions/setup-node from 6.1.0 to 6.2.0
2026-02-19 00:28:17 +00:00
501f89d3a0 Merge pull request #28 from jimeh/dependabot/github_actions/actions/checkout-6.0.2
Bump actions/checkout from 6.0.1 to 6.0.2
2026-02-19 00:28:04 +00:00
ba92e6c212 Merge pull request #31 from jimeh/dependabot/npm_and_yarn/npm-production-5c46221419
Bump the npm-production group with 3 updates
2026-02-19 00:27:48 +00:00
7bed32b60a Merge pull request #32 from jimeh/feat/theme-toggle-sun-moon-icon
feat: replace theme toggle system icon with custom sun-moon SVG
2026-02-19 00:24:15 +00:00
9652714455 feat: replace theme toggle system icon with custom sun-moon SVG
The computer-desktop icon for the system/auto theme state didn't visually
relate to the sun (light) and moon (dark) icons used for the other states.

Replace it with a custom half-sun icon that shows a sun circle with the
right half filled dark and left-side rays only, conveying "both light and
dark" to better represent the automatic/system theme preference.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 00:21:55 +00:00
dependabot[bot]
b33a02991c Bump the npm-production group with 3 updates
Bumps the npm-production group with 3 updates: [@astrojs/sitemap](https://github.com/withastro/astro/tree/HEAD/packages/integrations/sitemap), [@iconify-json/simple-icons](https://github.com/iconify/icon-sets) and [astro](https://github.com/withastro/astro/tree/HEAD/packages/astro).


Updates `@astrojs/sitemap` from 3.6.1 to 3.7.0
- [Release notes](https://github.com/withastro/astro/releases)
- [Changelog](https://github.com/withastro/astro/blob/main/packages/integrations/sitemap/CHANGELOG.md)
- [Commits](https://github.com/withastro/astro/commits/@astrojs/sitemap@3.7.0/packages/integrations/sitemap)

Updates `@iconify-json/simple-icons` from 1.2.66 to 1.2.69
- [Commits](https://github.com/iconify/icon-sets/commits)

Updates `astro` from 5.16.11 to 5.17.1
- [Release notes](https://github.com/withastro/astro/releases)
- [Changelog](https://github.com/withastro/astro/blob/main/packages/astro/CHANGELOG.md)
- [Commits](https://github.com/withastro/astro/commits/astro@5.17.1/packages/astro)

---
updated-dependencies:
- dependency-name: "@astrojs/sitemap"
  dependency-version: 3.7.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-production
- dependency-name: "@iconify-json/simple-icons"
  dependency-version: 1.2.69
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-production
- dependency-name: astro
  dependency-version: 5.17.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-01 07:29:23 +00:00
dependabot[bot]
fc393caa5b Bump actions/setup-node from 6.1.0 to 6.2.0
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 6.1.0 to 6.2.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](395ad32622...6044e13b5d)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: 6.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-01 07:28:21 +00:00
dependabot[bot]
b6dfa4b787 Bump actions/checkout from 6.0.1 to 6.0.2
Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](8e8c483db8...de0fac2e45)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-01 07:28:13 +00:00
dependabot[bot]
c4bb1ae3f1 Bump tar from 7.5.3 to 7.5.7
Bumps [tar](https://github.com/isaacs/node-tar) from 7.5.3 to 7.5.7.
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v7.5.3...v7.5.7)

---
updated-dependencies:
- dependency-name: tar
  dependency-version: 7.5.7
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-01 02:51:10 +00:00
3a64fee42e Merge pull request #27 from jimeh/feat/astro-experimental-fonts 2026-02-01 02:50:04 +00:00
e5d2604edc feat: migrate to Astro's experimental font API
Replace @fontsource-variable NPM packages with Astro's built-in
experimental font API using the Fontsource provider. Fonts are now
fetched at build time, cached locally, and served with the site.

This provides automatic @font-face generation, preload link injection,
and metric-adjusted fallback fonts (size-adjust, ascent-override, etc.)
to reduce CLS during font loading.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 02:43:48 +00:00
19a5bafeec Merge pull request #24 from jimeh/dependabot/npm_and_yarn/multi-91241d0e80 2026-01-19 00:08:05 +00:00
dependabot[bot]
e01d929793 Bump diff and astro
Bumps [diff](https://github.com/kpdecker/jsdiff) to 8.0.3 and updates ancestor dependency [astro](https://github.com/withastro/astro/tree/HEAD/packages/astro). These dependencies need to be updated together.


Updates `diff` from 5.2.0 to 8.0.3
- [Changelog](https://github.com/kpdecker/jsdiff/blob/master/release-notes.md)
- [Commits](https://github.com/kpdecker/jsdiff/compare/v5.2.0...v8.0.3)

Updates `astro` from 5.16.9 to 5.16.11
- [Release notes](https://github.com/withastro/astro/releases)
- [Changelog](https://github.com/withastro/astro/blob/main/packages/astro/CHANGELOG.md)
- [Commits](https://github.com/withastro/astro/commits/astro@5.16.11/packages/astro)

---
updated-dependencies:
- dependency-name: diff
  dependency-version: 8.0.3
  dependency-type: indirect
- dependency-name: astro
  dependency-version: 5.16.11
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-18 23:50:58 +00:00
02f2c9a887 Merge pull request #23 from jimeh/dependabot/npm_and_yarn/tar-7.5.3 2026-01-18 23:49:56 +00:00
dependabot[bot]
ebe2a6be99 Bump tar from 7.5.2 to 7.5.3
Bumps [tar](https://github.com/isaacs/node-tar) from 7.5.2 to 7.5.3.
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v7.5.2...v7.5.3)

---
updated-dependencies:
- dependency-name: tar
  dependency-version: 7.5.3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-17 15:48:02 +00:00
53e20b43d3 Merge pull request #22 from jimeh/fix/update-specs-add-paths 2026-01-16 19:19:04 +00:00
e85a83c2c6 fix: remove stale public/spec/* from update-specs add-paths
The update-specs script now writes SVG diagrams to src/content/spec/
alongside the markdown files, not to public/spec/. Remove the unused
path from the workflow's add-paths configuration.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 19:17:36 +00:00
be432b6f79 Merge pull request #21 from jimeh/claude/remove-mobile-tooltip-5B9Ib 2026-01-16 18:23:59 +00:00
Claude
bd5963d454 Remove mobile tooltip from copy button on markdown page
The tooltip is no longer needed since the button is fully visible on
mobile, including its "Copy"/"Copied!" text label which provides
sufficient feedback.
2026-01-16 18:17:35 +00:00
8465487155 Merge pull request #18 from jimeh/dependabot/npm_and_yarn/devalue-5.6.2 2026-01-16 18:13:18 +00:00
3f30bedcd3 Merge pull request #19 from jimeh/dependabot/npm_and_yarn/h3-1.15.5 2026-01-16 18:13:01 +00:00
df2caadb70 Merge pull request #20 from jimeh/feat/llms-txt-and-spec-url-pattern 2026-01-16 18:09:00 +00:00
ee0c0171a5 feat: add llms.txt and rename raw spec URL to match filename
- Add /llms.txt endpoint following llmstxt.org specification format
- Change raw markdown URL from /spec/{version}/raw.md to
  /spec/git-common-flow-v{version}.md to match download filename
- Add <link rel="alternate"> for raw markdown in spec pages
- Add Raw button to markdown view page

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 18:04:56 +00:00
dependabot[bot]
2705ab40d0 Bump h3 from 1.15.4 to 1.15.5
Bumps [h3](https://github.com/h3js/h3) from 1.15.4 to 1.15.5.
- [Release notes](https://github.com/h3js/h3/releases)
- [Changelog](https://github.com/h3js/h3/blob/v1.15.5/CHANGELOG.md)
- [Commits](https://github.com/h3js/h3/compare/v1.15.4...v1.15.5)

---
updated-dependencies:
- dependency-name: h3
  dependency-version: 1.15.5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-15 21:23:14 +00:00
dependabot[bot]
f9f55d3a72 Bump devalue from 5.6.1 to 5.6.2
Bumps [devalue](https://github.com/sveltejs/devalue) from 5.6.1 to 5.6.2.
- [Release notes](https://github.com/sveltejs/devalue/releases)
- [Changelog](https://github.com/sveltejs/devalue/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/devalue/compare/v5.6.1...v5.6.2)

---
updated-dependencies:
- dependency-name: devalue
  dependency-version: 5.6.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-15 19:08:34 +00:00
13 changed files with 745 additions and 664 deletions

47
.github/workflows/update-specs.yml vendored Normal file
View File

@@ -0,0 +1,47 @@
name: Update Specs
on:
workflow_dispatch:
jobs:
update-specs:
runs-on: ubuntu-latest
steps:
- name: Generate GitHub App Token
id: app-token
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
with:
app-id: ${{ secrets.BOT_APP_ID }}
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
token: ${{ steps.app-token.outputs.token }}
- name: Setup Node.js
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version-file: ".node-version"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Update specs
run: npm run update-specs
- name: Create Pull Request
uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725 # v8.0.0
with:
token: ${{ steps.app-token.outputs.token }}
commit-message: "chore: update spec versions"
title: "chore: update spec versions"
body: |
Automated update of spec versions from upstream repository.
This PR was created by the update-specs workflow.
branch: update-specs
delete-branch: true
add-paths: |
src/content/spec/*

View File

@@ -47,7 +47,7 @@ The site is built to `dist/` and deployed to Cloudflare Workers.
- **Astro 5.x** static site generator
- **Tailwind CSS 4.x** for styling with dark mode support
- **astro-icon** with Heroicons and Simple Icons for icons
- **astro-icon** with Heroicons, Simple Icons, and custom local SVGs (`src/icons/`)
- **Content Collections** for spec markdown files
- **TypeScript** throughout
- **Node.js** as JavaScript runtime (managed via mise)

View File

@@ -1,4 +1,4 @@
import { defineConfig } from "astro/config";
import { defineConfig, fontProviders } from "astro/config";
import tailwindcss from "@tailwindcss/vite";
import sitemap from "@astrojs/sitemap";
import icon from "astro-icon";
@@ -10,4 +10,29 @@ export default defineConfig({
vite: {
plugins: [tailwindcss()],
},
experimental: {
fonts: [
{
provider: fontProviders.fontsource(),
name: "Bricolage Grotesque",
cssVariable: "--font-bricolage",
weights: ["200 800"],
fallbacks: ["system-ui", "sans-serif"],
},
{
provider: fontProviders.fontsource(),
name: "DM Sans",
cssVariable: "--font-dm-sans",
weights: ["100 1000"],
fallbacks: ["system-ui", "sans-serif"],
},
{
provider: fontProviders.fontsource(),
name: "JetBrains Mono",
cssVariable: "--font-jetbrains",
weights: ["100 800"],
fallbacks: ["SF Mono", "Consolas", "monospace"],
},
],
},
});

1121
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -14,13 +14,10 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/sitemap": "^3.6.1",
"@fontsource-variable/bricolage-grotesque": "^5.2.10",
"@fontsource-variable/dm-sans": "^5.2.8",
"@fontsource-variable/jetbrains-mono": "^5.2.8",
"@astrojs/sitemap": "^3.7.0",
"@iconify-json/heroicons": "^1.2.3",
"@iconify-json/simple-icons": "^1.2.65",
"astro": "^5.16.8",
"@iconify-json/simple-icons": "^1.2.69",
"astro": "^5.17.1",
"astro-icon": "^1.1.5",
"rehype-autolink-headings": "^7.1.0",
"rehype-slug": "^6.0.0",
@@ -32,18 +29,18 @@
},
"devDependencies": {
"@astrojs/check": "^0.9.6",
"@eslint/js": "^9.39.2",
"@eslint/js": "^10.0.1",
"@tailwindcss/typography": "^0.5.19",
"@tailwindcss/vite": "^4.1.18",
"@tailwindcss/vite": "^4.2.0",
"@types/semver": "^7.7.1",
"eslint": "^9.39.2",
"eslint-plugin-astro": "^1.5.0",
"prettier": "^3.7.4",
"eslint": "^10.0.0",
"eslint-plugin-astro": "^1.6.0",
"prettier": "^3.8.1",
"prettier-plugin-astro": "^0.14.1",
"svgo": "^4.0.0",
"tailwindcss": "^4.1.18",
"tsx": "^4.21.0",
"typescript": "^5.9.3",
"typescript-eslint": "^8.52.0"
"typescript-eslint": "^8.56.0"
}
}

View File

@@ -14,11 +14,7 @@ import { Icon } from "astro-icon/components";
>
<Icon name="heroicons:sun" data-theme-icon="light" class="hidden w-5 h-5" />
<Icon name="heroicons:moon" data-theme-icon="dark" class="hidden w-5 h-5" />
<Icon
name="heroicons:computer-desktop"
data-theme-icon="auto"
class="hidden w-5 h-5"
/>
<Icon name="sun-moon" data-theme-icon="auto" class="hidden w-5 h-5" />
</button>
<!-- Tooltip -->
<div

8
src/icons/sun-moon.svg Normal file
View File

@@ -0,0 +1,8 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
<!-- Circle outline -->
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z"/>
<!-- Right half filled (dark/moon side) -->
<path fill="currentColor" d="M12 8.25a3.75 3.75 0 0 1 0 7.5z"/>
<!-- Left-side sun rays (top, top-left, left, bottom-left, bottom) -->
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M12 3v2.25M7.227 7.227 5.636 5.636M5.25 12H3M7.227 16.773l-1.591 1.591M12 18.75V21"/>
</svg>

After

Width:  |  Height:  |  Size: 633 B

View File

@@ -1,7 +1,5 @@
---
import "@fontsource-variable/bricolage-grotesque";
import "@fontsource-variable/dm-sans";
import "@fontsource-variable/jetbrains-mono";
import { Font } from "astro:assets";
import "../styles/global.css";
import { config } from "../config";
@@ -11,7 +9,9 @@ interface Props {
}
const { title, description = config.description } = Astro.props;
const fullTitle = title.includes(config.title) ? title : `${title} | ${config.title}`;
const fullTitle = title.includes(config.title)
? title
: `${title} | ${config.title}`;
const canonicalUrl = Astro.url.href;
---
@@ -42,12 +42,23 @@ const canonicalUrl = Astro.url.href;
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
<!-- Fonts -->
<Font
cssVariable="--font-bricolage"
preload={[{ weight: "700" }, { weight: "800" }]}
/>
<Font cssVariable="--font-dm-sans" preload={[{ weight: "400" }]} />
<Font cssVariable="--font-jetbrains" preload={[{ weight: "400" }]} />
<!-- Slot for page-specific head content -->
<slot name="head" />
<!-- Prevent flash of wrong theme -->
<script is:inline>
(function () {
const mode = localStorage.getItem("theme");
const prefersDark = window.matchMedia(
"(prefers-color-scheme: dark)",
"(prefers-color-scheme: dark)"
).matches;
if (mode === "dark" || (mode !== "light" && prefersDark)) {
document.documentElement.classList.add("dark");
@@ -63,7 +74,7 @@ const canonicalUrl = Astro.url.href;
document.addEventListener("astro:after-swap", () => {
const mode = localStorage.getItem("theme");
const prefersDark = window.matchMedia(
"(prefers-color-scheme: dark)",
"(prefers-color-scheme: dark)"
).matches;
if (mode === "dark" || (mode !== "light" && prefersDark)) {
document.documentElement.classList.add("dark");

View File

@@ -31,7 +31,11 @@ const markdown = content.replace(/^---[\s\S]*?---\n/, "");
const parsed = await parseSpecContent(markdown);
// Read SVG content for inline embedding
const svgFilePath = path.join(process.cwd(), "src/content/spec", `${version}.svg`);
const svgFilePath = path.join(
process.cwd(),
"src/content/spec",
`${version}.svg`
);
let svgContent: string | null = null;
if (fs.existsSync(svgFilePath)) {
svgContent = fs.readFileSync(svgFilePath, "utf-8");
@@ -39,14 +43,19 @@ if (fs.existsSync(svgFilePath)) {
---
<BaseLayout title={spec.data.title}>
<Fragment slot="head">
<link
rel="alternate"
type="text/markdown"
href={`/spec/git-common-flow-v${version}.md`}
title="Raw Markdown"
/>
</Fragment>
<Header version={version} versions={versions} />
<main>
<Hero
version={version}
versions={versions}
svgContent={svgContent}
/>
<Hero version={version} versions={versions} svgContent={svgContent} />
<AboutSection
introduction={parsed.introduction}

25
src/pages/llms.txt.ts Normal file
View File

@@ -0,0 +1,25 @@
import type { APIRoute } from "astro";
import { getVersionInfo } from "../utils/versions";
export const GET: APIRoute = async () => {
const { currentVersion } = await getVersionInfo();
const content = `# Common-Flow
> A Git workflow specification combining GitHub Flow with versioned releases.
Common-Flow is a sensible git workflow based on GitHub Flow, with the addition
of versioned releases, optional release branches, and without the requirement
to deploy to production all the time.
## Docs
- [Git Common-Flow Specification](/spec/git-common-flow-v${currentVersion}.md): The complete Git Common-Flow v${currentVersion} specification in Markdown format
`;
return new Response(content, {
headers: {
"Content-Type": "text/plain; charset=utf-8",
},
});
};

View File

@@ -116,6 +116,15 @@ const previewHtml = await unified()
---
<BaseLayout title={`${spec.data.title} - Markdown`}>
<Fragment slot="head">
<link
rel="alternate"
type="text/markdown"
href={`/spec/git-common-flow-v${version}.md`}
title="Raw Markdown"
/>
</Fragment>
<!-- Header -->
<header
class="sticky top-0 z-50 border-b
@@ -201,31 +210,31 @@ const previewHtml = await unified()
<!-- Copy and Download buttons -->
<div class="flex items-center gap-3 order-1 sm:order-3">
<!-- Copy button -->
<div class="relative">
<button
id="copy-btn"
type="button"
class="inline-flex items-center gap-1.5 px-3 py-1.5 text-sm
font-medium rounded-lg transition-colors cursor-pointer
text-gray-600 dark:text-neutral-400
hover:bg-gray-100 hover:text-gray-950
dark:hover:bg-neutral-800 dark:hover:text-neutral-50"
>
<Icon name="heroicons:clipboard-document" class="w-4 h-4" />
<span data-copy-text>Copy</span>
</button>
<!-- Mobile tooltip -->
<div
id="copy-tooltip"
class="sm:hidden absolute left-1/2 -translate-x-1/2 top-full
mt-2 px-2 py-1 text-xs font-medium whitespace-nowrap
rounded-md shadow-sm bg-gray-900 text-white
dark:bg-white dark:text-gray-900 opacity-0
pointer-events-none transition-opacity duration-200"
>
Copied!
</div>
</div>
<button
id="copy-btn"
type="button"
class="inline-flex items-center gap-1.5 px-3 py-1.5 text-sm
font-medium rounded-lg transition-colors cursor-pointer
text-gray-600 dark:text-neutral-400
hover:bg-gray-100 hover:text-gray-950
dark:hover:bg-neutral-800 dark:hover:text-neutral-50"
>
<Icon name="heroicons:clipboard-document" class="w-4 h-4" />
<span data-copy-text>Copy</span>
</button>
<!-- Raw button -->
<a
href={`/spec/git-common-flow-v${version}.md`}
class="inline-flex items-center gap-1.5 px-3 py-1.5 text-sm
font-medium rounded-lg transition-colors
text-gray-600 dark:text-neutral-400
hover:bg-gray-100 hover:text-gray-950
dark:hover:bg-neutral-800 dark:hover:text-neutral-50"
>
<Icon name="heroicons:document-text" class="w-4 h-4" />
<span>Raw</span>
</a>
<!-- Download button -->
<button
@@ -368,7 +377,6 @@ const previewHtml = await unified()
const downloadBtn = document.getElementById("download-btn");
const rawContent = document.getElementById("markdown-raw");
const copyText = copyBtn?.querySelector("[data-copy-text]");
const copyTooltip = document.getElementById("copy-tooltip");
const toggleContainer = document.getElementById("toggle-container");
const toggleCode = document.getElementById("toggle-code");
@@ -471,22 +479,12 @@ const previewHtml = await unified()
togglePreview?.addEventListener("click", () => setActiveToggle(false));
function showCopiedFeedback() {
// Desktop: change button text
if (copyText) {
copyText.textContent = "Copied!";
setTimeout(() => {
copyText.textContent = "Copy";
}, 2000);
}
// Mobile: show tooltip
if (copyTooltip) {
copyTooltip.classList.remove("opacity-0");
copyTooltip.classList.add("opacity-100");
setTimeout(() => {
copyTooltip.classList.remove("opacity-100");
copyTooltip.classList.add("opacity-0");
}, 2000);
}
}
// Copy button

View File

@@ -0,0 +1,30 @@
import type { APIRoute, GetStaticPaths } from "astro";
import { getCollection } from "astro:content";
import * as fs from "node:fs";
import * as path from "node:path";
export const getStaticPaths: GetStaticPaths = async () => {
const specs = await getCollection("spec");
return specs.map((spec) => ({
params: { version: spec.data.version },
}));
};
export const GET: APIRoute = ({ params }) => {
const version = params.version;
const filePath = path.join(
process.cwd(),
"src/content/spec",
`${version}.md`
);
const content = fs.readFileSync(filePath, "utf-8");
const markdown = content.replace(/^---[\s\S]*?---\n/, "");
const filename = `git-common-flow-v${version}.md`;
return new Response(markdown, {
headers: {
"Content-Type": "text/markdown; charset=utf-8",
"Content-Disposition": `inline; filename="${filename}"`,
},
});
};

View File

@@ -8,10 +8,10 @@
--color-accent: theme(colors.sky.500);
--color-accent-light: theme(colors.sky.400);
/* Fonts - self-hosted via fontsource */
--font-display: "Bricolage Grotesque Variable", system-ui, sans-serif;
--font-sans: "DM Sans Variable", system-ui, sans-serif;
--font-mono: "JetBrains Mono Variable", "SF Mono", Consolas, monospace;
/* Fonts - via Astro experimental font API (fontsource provider) */
--font-display: var(--font-bricolage);
--font-sans: var(--font-dm-sans);
--font-mono: var(--font-jetbrains);
/* Sizing */
--header-height: 4rem;