mews.page/Makefile

34 lines
1,020 B
Makefile
Raw Normal View History

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
cd site && uv run pelican content
cp site/output/index.html site/output/check.html build/
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)"
uv run mewslint --quiet build/index.html build/check.html \
2026-10-11 15:05:42 +03:00
build/spec/0.1.html
@echo "site built in build/"
test:
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:
rm -rf build site/output