2026-10-11 15:05:42 +03:00
|
|
|
# Local build and checks. The real gate is `nix build .#site`, which runs the
|
|
|
|
|
# same steps in the sandbox and refuses to produce a non-conforming page.
|
|
|
|
|
|
|
|
|
|
SPEC_DESCRIPTION = The Mews Profile specification, version 0.1.
|
|
|
|
|
|
|
|
|
|
.PHONY: site test lint clean
|
|
|
|
|
|
|
|
|
|
site:
|
|
|
|
|
rm -rf build
|
|
|
|
|
mkdir -p build/spec build/dtd
|
refactor: split the repo into self-contained validator, directory, quickstart, spec and site folders
validator/ holds mewslint (lint, css, fetch, DTD/CSS data); directory/ holds
the mews.page service (app, db, check, pages, cli) and depends on validator/;
quickstart/ holds mews-quickstart and md2mews.py for third parties who want
to create Mews content without cloning the repo; spec/ consolidates doc/ and
dtd/ with the canonical mews-0.1.css; site/ becomes a Pelican project with
the forward-facing pages as Markdown, the check form kept as a raw HTML
snippet. Root pyproject.toml is now a virtual uv workspace over validator,
directory and quickstart, with cross-cutting tests that span more than one
of them staying at the repo root. Makefile and flake.nix updated to match.
2026-10-13 12:29:23 +03:00
|
|
|
cd site && uv run pelican content
|
2026-10-13 13:04:25 +03:00
|
|
|
cp site/output/*.html build/
|
refactor: split the repo into self-contained validator, directory, quickstart, spec and site folders
validator/ holds mewslint (lint, css, fetch, DTD/CSS data); directory/ holds
the mews.page service (app, db, check, pages, cli) and depends on validator/;
quickstart/ holds mews-quickstart and md2mews.py for third parties who want
to create Mews content without cloning the repo; spec/ consolidates doc/ and
dtd/ with the canonical mews-0.1.css; site/ becomes a Pelican project with
the forward-facing pages as Markdown, the check form kept as a raw HTML
snippet. Root pyproject.toml is now a virtual uv workspace over validator,
directory and quickstart, with cross-cutting tests that span more than one
of them staying at the repo root. Makefile and flake.nix updated to match.
2026-10-13 12:29:23 +03:00
|
|
|
cp site/output/mews-0.1.css build/mews-0.1.css
|
|
|
|
|
cp spec/mews-0.1.css build/spec/mews-0.1.css
|
|
|
|
|
cp spec/mews-0.1.dtd spec/xhtml-mobile12.dtd build/dtd/
|
|
|
|
|
uv run --script quickstart/md2mews.py spec/SPEC.md -o build/spec/0.1.html \
|
|
|
|
|
--lang en --variant mews-cool --description "$(SPEC_DESCRIPTION)"
|
2026-10-13 13:04:25 +03:00
|
|
|
uv run mewslint --quiet build/*.html build/spec/0.1.html
|
2026-10-11 15:05:42 +03:00
|
|
|
@echo "site built in build/"
|
|
|
|
|
|
|
|
|
|
test:
|
refactor: split the repo into self-contained validator, directory, quickstart, spec and site folders
validator/ holds mewslint (lint, css, fetch, DTD/CSS data); directory/ holds
the mews.page service (app, db, check, pages, cli) and depends on validator/;
quickstart/ holds mews-quickstart and md2mews.py for third parties who want
to create Mews content without cloning the repo; spec/ consolidates doc/ and
dtd/ with the canonical mews-0.1.css; site/ becomes a Pelican project with
the forward-facing pages as Markdown, the check form kept as a raw HTML
snippet. Root pyproject.toml is now a virtual uv workspace over validator,
directory and quickstart, with cross-cutting tests that span more than one
of them staying at the repo root. Makefile and flake.nix updated to match.
2026-10-13 12:29:23 +03:00
|
|
|
uv run --script spec/check_dtd.py
|
|
|
|
|
cd validator && uv run pytest -q
|
|
|
|
|
cd directory && uv run pytest -q
|
2026-10-11 15:05:42 +03:00
|
|
|
uv run pytest -q
|
|
|
|
|
|
|
|
|
|
lint:
|
|
|
|
|
uv run ruff check .
|
|
|
|
|
uv run ruff format --check .
|
|
|
|
|
|
|
|
|
|
clean:
|
refactor: split the repo into self-contained validator, directory, quickstart, spec and site folders
validator/ holds mewslint (lint, css, fetch, DTD/CSS data); directory/ holds
the mews.page service (app, db, check, pages, cli) and depends on validator/;
quickstart/ holds mews-quickstart and md2mews.py for third parties who want
to create Mews content without cloning the repo; spec/ consolidates doc/ and
dtd/ with the canonical mews-0.1.css; site/ becomes a Pelican project with
the forward-facing pages as Markdown, the check form kept as a raw HTML
snippet. Root pyproject.toml is now a virtual uv workspace over validator,
directory and quickstart, with cross-cutting tests that span more than one
of them staying at the repo root. Makefile and flake.nix updated to match.
2026-10-13 12:29:23 +03:00
|
|
|
rm -rf build site/output
|