diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index e5e887a5c..23d0bbee8 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -17,6 +17,8 @@ jobs: - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 with: node-version-file: '.nvmrc' + - name: Install uv + uses: astral-sh/setup-uv@v7 - name: Install NPM packages run: npm ci @@ -27,7 +29,7 @@ jobs: npm run generate-typings - name: Build docs - run: npm run mkdocs-build + run: npm run docs-build - name: Deploy diff --git a/README.md b/README.md index c002e2e67..2c25c693a 100644 --- a/README.md +++ b/README.md @@ -21,13 +21,13 @@ We aim to avoid breaking changes in the MapLibre style specification because it ## Documentation The [documentation](https://maplibre.org/maplibre-style-spec) of the style specification also lives in this repository. -We use [MkDocs](https://www.mkdocs.org/) with the [Material for MkDocs](https://squidfunk.github.io/mkdocs-material) theme. +We use [Zensical](https://www.zensical.org/). -To work on the documentation locally, you need to have Docker installed and running. -Start MkDocs with +To work on the documentation locally, you need to have [UV](https://docs.astral.sh/uv/getting-started/installation/) and [python](https://www.python.org/downloads/) installed. +Start Zensical with ```bash -npm run mkdocs +npm run docs ``` Most of the documentation is generated (from e.g. `v8.json`). @@ -91,4 +91,4 @@ $ gl-style-validate style.json ``` Will validate the given style JSON and print errors to stdout. -Provide a `--json` flag to get JSON output. \ No newline at end of file +Provide a `--json` flag to get JSON output. diff --git a/package.json b/package.json index c30fcc5c8..2f1cd09f0 100644 --- a/package.json +++ b/package.json @@ -22,8 +22,8 @@ "generate-style-spec": "node --no-warnings --loader ts-node/esm build/generate-style-spec.ts", "generate-typings": "dts-bundle-generator -o ./dist/index.d.ts ./src/index.ts", "generate-docs": "node ${WATCH+--watch} --no-warnings --loader ts-node/esm build/generate-docs.ts", - "mkdocs": "docker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material", - "mkdocs-build": "npm run generate-docs && docker run --rm -v ${PWD}:/docs squidfunk/mkdocs-material build --strict", + "docs": "uvx zensical serve --open", + "docs-build": "npm run generate-docs && uvx zensical build", "test": "vitest", "test-unit": "vitest run --config vitest.config.unit.ts", "test-unit-ci": "vitest run --config vitest.config.unit.ts --coverage",