diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 81c539d..5088911 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,6 +35,22 @@ jobs: fi done + - name: Verify theme delivery in built sites + run: | + # --strict fails on broken links, not on a stylesheet or font + # that 404s. Assert the theme's assets actually reached each + # built site/ directory, reading extra_css and theme.logo from + # the resolved config so the check tracks mkdocs-base.yml. + for sample_dir in samples/*/; do + name="$(basename "$sample_dir")" + if [ -f "$sample_dir/mkdocs.yml" ]; then + echo "Verifying theme delivery for $name..." + python3 scripts/verify-theme-delivery.py \ + --config "$sample_dir/mkdocs.yml" \ + --site "site-ci/$name" + fi + done + build-pdf: name: Build PDF runs-on: ubuntu-latest diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index f603b5d..f274546 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -39,6 +39,15 @@ jobs: run: | mkdir -p site cp samples/index.html site/ + # This site deploys on every push to main, so it shows + # unreleased state no consumer can yet install. Stamp the built + # revision onto the landing page so an evaluator is not misled + # about what they are looking at. + SHORT_SHA="${GITHUB_SHA:0:7}" + COMMIT_URL="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/commit/${GITHUB_SHA}" + sed -i \ + "s|Preview build from the local working tree|Built from ${SHORT_SHA} on $(date -u +%Y-%m-%d)|" \ + site/index.html for sample_dir in samples/*/; do name="$(basename "$sample_dir")" if [ -f "$sample_dir/mkdocs.yml" ]; then diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 46a7788..76cde65 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,11 +15,22 @@ jobs: steps: - name: Checkout uses: actions/checkout@v7 + with: + # The surface guard reads the previous tag's tree, so + # the job needs full history and the tags to resolve and + # read it. actions/checkout is shallow and tagless by + # default, which would let the guard pass while silently + # comparing against nothing. + fetch-depth: 0 + fetch-tags: true - name: Extract version from tag id: version run: echo "version=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT" + - name: Guard release surface + run: ./scripts/check-release-surface.sh "${{ steps.version.outputs.version }}" + - name: Extract release notes from CHANGELOG.md id: release_notes run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index 89e11b3..dc975de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,72 +1,90 @@ # Changelog -This file documents recent notable changes to this project. The format of this -file is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and -this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +This file documents recent notable changes to this project. Within each +release, entries are grouped by the area a consumer's reviewer triages — +`manual`, `api-reference`, `shared`, and `scripts` — rather than by the +Keep a Changelog change-type headings, so a consumer reads only the +sections that affect its template. Version numbers follow the +`MAJOR.MINOR.PATCH` policy described in [the README](README.md#versioning). ## Unreleased -### Added +### manual -- Both `mkdocs-base.yml` files now carry a self-served browser identity: - an indigo palette with a light/dark toggle, `brand.svg` as the header - logo and favicon, and `theme.font: false` so no Google Fonts are - requested. `shared/styles/base.css` declares `@font-face` for the six - shipped woff2 files and sets `--md-text-font: "Pretendard"`, giving - Korean body typography served entirely from the site. -- The base `markdown_extensions` gained a Unicode-aware `toc.slugify`, - so Korean headings keep their characters in anchor ids, and a - `mermaid` custom fence under `pymdownx.superfences`, so a tagged block - renders as a `.mermaid` diagram. `base.css` also carries shared rules - that scroll wide tables horizontally and center Mermaid diagrams. -- Added `scripts/install-samples.sh`, which installs the theme into each - sample from the local checkout so the samples build through the same - `INHERIT` path a consumer uses. It takes a `--force` (`--clean`) flag - that drops each sample's generated `docs/theme/` before reinstalling, - so edits to a template or shared file are picked up instead of the - cached tree `fetch-theme.sh` would otherwise keep. `serve-samples.sh` - passes `--force` on every run so the preview always reflects edits. +- `mkdocs-base.yml` now carries a self-served browser identity: an indigo + palette with a light/dark toggle, `brand.svg` as the header logo and + favicon, and `theme.font: false` so no Google Fonts are requested. +- The base `markdown_extensions` gained a Unicode-aware `toc.slugify`, so + Korean headings keep their characters in anchor ids, and a `mermaid` + custom fence under `pymdownx.superfences`, so a tagged block renders as + a `.mermaid` diagram. +- Consuming projects now `INHERIT: docs/theme/mkdocs-base.yml` instead of + copying settings out of it. Because MkDocs replaces lists and scalars + wholesale on merge, `theme.features`, `markdown_extensions`, + `extra_css`, and `exclude_docs` are defined fully in the base and must + never be partially overridden by a consumer. The sample builds through + this path against a theme installed from the local checkout; its + `docs/theme/` tree is generated, not committed. +- `extra_css` now points at `theme/`. -### Changed +### api-reference -- Consuming projects now `INHERIT: docs/theme/mkdocs-base.yml` instead - of copying settings out of it. The base is the union of what every - consumer needs; because MkDocs replaces lists and scalars wholesale on - merge, `theme.features`, `markdown_extensions`, `extra_css`, and - `exclude_docs` must be defined fully in the base and never partially - overridden by a consumer. Both sample sites build through this path - against a theme installed from the local checkout; a sample's +- `mkdocs-base.yml` now carries a self-served browser identity: an indigo + palette with a light/dark toggle, `brand.svg` as the header logo and + favicon, and `theme.font: false` so no Google Fonts are requested. +- The base `markdown_extensions` gained a Unicode-aware `toc.slugify`, so + Korean headings keep their characters in anchor ids, and a `mermaid` + custom fence under `pymdownx.superfences`, so a tagged block renders as + a `.mermaid` diagram. +- Consuming projects now `INHERIT: docs/theme/mkdocs-base.yml` instead of + copying settings out of it. Because MkDocs replaces lists and scalars + wholesale on merge, `theme.features`, `markdown_extensions`, + `extra_css`, and `exclude_docs` are defined fully in the base and must + never be partially overridden by a consumer. The sample builds through + this path against a theme installed from the local checkout; its `docs/theme/` tree is generated, not committed. +- `extra_css` now points at `theme/` and includes `api.css`. + +### shared + +- `styles/base.css` declares `@font-face` for the six shipped woff2 files + and sets `--md-text-font: "Pretendard"`, giving Korean body typography + served entirely from the site. It also carries shared rules that scroll + wide tables horizontally and center Mermaid diagrams. +### scripts + +- Added `install-samples.sh`, which installs the theme into each sample + from the local checkout so the samples build through the same `INHERIT` + path a consumer uses. It takes a `--force` (`--clean`) flag that drops + each sample's generated `docs/theme/` before reinstalling, so edits to a + template or shared file are picked up instead of the cached tree + `fetch-theme.sh` would otherwise keep. `serve-samples.sh` passes + `--force` on every run so the preview always reflects edits. - `fetch-theme.sh` now installs into `docs/theme/` instead of - `docs/.theme/`. MkDocs excludes every dot-prefixed path from the - build, so assets installed under the old path never reached the - published site. + `docs/.theme/`. MkDocs excludes every dot-prefixed path from the build, + so assets installed under the old path never reached the published site. - `fetch-theme.sh` takes no arguments. The repository, template, and version are read from `docs/theme.toml`, which the consuming project commits. `--source