From ec1e49d3f97aa01172ba676143a350bc5573ff0f Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Sun, 30 Nov 2025 05:48:00 +0100 Subject: [PATCH 1/6] migrate our docs to zensical --- .github/workflows/build-docs.yml | 4 +- README.md | 6 +- package-lock.json | 152 ++++--------------------------- package.json | 4 +- 4 files changed, 28 insertions(+), 138 deletions(-) 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 f9c2e7554..ad7a27c2d 100644 --- a/README.md +++ b/README.md @@ -20,12 +20,12 @@ 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. +The [documentation](https://maplibre.org/maplibre-style-spec) of the style specification also lives in this repository. 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 Docker installed and running. Start Zensical with ``` -npm run mkdocs +npm run docs ``` Most of the documentation is generated (from e.g. `v8.json`). In another terminal, run: diff --git a/package-lock.json b/package-lock.json index 558eb3e4b..4cbbfbbeb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -69,7 +69,6 @@ "dev": true, "license": "MIT", "optional": true, - "peer": true, "dependencies": { "@csstools/css-calc": "^2.1.3", "@csstools/css-color-parser": "^3.0.9", @@ -167,7 +166,6 @@ ], "license": "MIT-0", "optional": true, - "peer": true, "engines": { "node": ">=18" } @@ -189,7 +187,6 @@ ], "license": "MIT", "optional": true, - "peer": true, "engines": { "node": ">=18" }, @@ -215,7 +212,6 @@ ], "license": "MIT", "optional": true, - "peer": true, "dependencies": { "@csstools/color-helpers": "^5.0.2", "@csstools/css-calc": "^2.1.3" @@ -228,53 +224,6 @@ "@csstools/css-tokenizer": "^3.0.3" } }, - "node_modules/@csstools/css-parser-algorithms": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-3.0.4.tgz", - "integrity": "sha512-Up7rBoV77rv29d3uKHUIVubz1BTcgyUK72IvCQAbfbMv584xHcGKCKbWh7i8hPrRJ7qU4Y8IO3IY9m+iTB7P3A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "@csstools/css-tokenizer": "^3.0.3" - } - }, - "node_modules/@csstools/css-tokenizer": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-3.0.3.tgz", - "integrity": "sha512-UJnjoFsmxfKUdNYdWgOB0mWUypuLvAfQPH1+pyvRJs6euowbFkFC6P13w1l8mJyi3vxYMxc9kld5jZEGRQs6bw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": ">=18" - } - }, "node_modules/@es-joy/jsdoccomment": { "version": "0.76.0", "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.76.0.tgz", @@ -1799,6 +1748,7 @@ "integrity": "sha512-GNWcUTRBgIRJD5zj+Tq0fKOJ5XZajIiBroOF0yvj2bSU1WvNdYS/dn9UxwsujGW4JX06dnHyjV2y9rRaybH0iQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "undici-types": "~7.16.0" } @@ -1855,6 +1805,7 @@ "integrity": "sha512-lJi3PfxVmo0AkEY93ecfN+r8SofEqZNGByvHAI3GBLrvt1Cw6H5k1IM02nSzu0RfUafr2EvFSw0wAsZgubNplQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "8.47.0", "@typescript-eslint/types": "8.47.0", @@ -2251,6 +2202,7 @@ "integrity": "sha512-MFV6GhTflgBj194+vowTB2iLI5niMZhqiW7/NV7U4AfWbX/IAtsq4zA+gzCLyGzpsQUdJlX26hrQ1vuWShq2BQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@vitest/utils": "4.0.13", "fflate": "^0.8.2", @@ -2287,6 +2239,7 @@ "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, "license": "MIT", + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -2319,7 +2272,6 @@ "dev": true, "license": "MIT", "optional": true, - "peer": true, "engines": { "node": ">= 14" } @@ -2569,7 +2521,6 @@ "dev": true, "license": "MIT", "optional": true, - "peer": true, "dependencies": { "@asamuzakjp/css-color": "^3.1.2", "rrweb-cssom": "^0.8.0" @@ -2585,7 +2536,6 @@ "dev": true, "license": "MIT", "optional": true, - "peer": true, "dependencies": { "whatwg-mimetype": "^4.0.0", "whatwg-url": "^14.0.0" @@ -2618,8 +2568,7 @@ "integrity": "sha512-8vDa8Qxvr/+d94hSh5P3IJwI5t8/c0KsMp+g8bNw9cY2icONa5aPfvKeieW1WlG0WQYwwhJ7mjui2xtiePQSXw==", "dev": true, "license": "MIT", - "optional": true, - "peer": true + "optional": true }, "node_modules/deep-is": { "version": "0.1.4", @@ -2674,7 +2623,6 @@ "dev": true, "license": "BSD-2-Clause", "optional": true, - "peer": true, "engines": { "node": ">=0.12" }, @@ -2746,6 +2694,7 @@ "integrity": "sha512-BhHmn2yNOFA9H9JmmIVKJmd288g9hrVRDkdoIgRCRuSySRUHH7r/DI6aAXW9T1WwUuY3DFgrcaqB+deURBLR5g==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", @@ -3308,7 +3257,6 @@ "dev": true, "license": "MIT", "optional": true, - "peer": true, "dependencies": { "whatwg-encoding": "^3.1.1" }, @@ -3347,7 +3295,6 @@ "dev": true, "license": "MIT", "optional": true, - "peer": true, "dependencies": { "agent-base": "^7.1.0", "debug": "^4.3.4" @@ -3363,7 +3310,6 @@ "dev": true, "license": "MIT", "optional": true, - "peer": true, "dependencies": { "agent-base": "^7.1.2", "debug": "4" @@ -3378,7 +3324,6 @@ "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", "dev": true, "optional": true, - "peer": true, "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" }, @@ -3497,8 +3442,7 @@ "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", "dev": true, - "optional": true, - "peer": true + "optional": true }, "node_modules/is-reference": { "version": "1.2.1", @@ -3571,48 +3515,6 @@ "node": ">=20.0.0" } }, - "node_modules/jsdom": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-26.1.0.tgz", - "integrity": "sha512-Cvc9WUhxSMEo4McES3P7oK3QaXldCfNWp7pl2NNeiIFlCoLr3kfq9kb1fxftiwk1FLV7CvpvDfonxtzUDeSOPg==", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "cssstyle": "^4.2.1", - "data-urls": "^5.0.0", - "decimal.js": "^10.5.0", - "html-encoding-sniffer": "^4.0.0", - "http-proxy-agent": "^7.0.2", - "https-proxy-agent": "^7.0.6", - "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.16", - "parse5": "^7.2.1", - "rrweb-cssom": "^0.8.0", - "saxes": "^6.0.0", - "symbol-tree": "^3.2.4", - "tough-cookie": "^5.1.1", - "w3c-xmlserializer": "^5.0.0", - "webidl-conversions": "^7.0.0", - "whatwg-encoding": "^3.1.1", - "whatwg-mimetype": "^4.0.0", - "whatwg-url": "^14.1.1", - "ws": "^8.18.0", - "xml-name-validator": "^5.0.0" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "canvas": "^3.0.0" - }, - "peerDependenciesMeta": { - "canvas": { - "optional": true - } - } - }, "node_modules/json-buffer": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", @@ -3671,8 +3573,7 @@ "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", "dev": true, "license": "ISC", - "optional": true, - "peer": true + "optional": true }, "node_modules/magic-string": { "version": "0.30.21", @@ -3836,8 +3737,7 @@ "integrity": "sha512-/ieB+mDe4MrrKMT8z+mQL8klXydZWGR5Dowt4RAGKbJ3kIGEx3X4ljUo+6V73IXtUPWgfOlU5B9MlGxFO5T+cA==", "dev": true, "license": "MIT", - "optional": true, - "peer": true + "optional": true }, "node_modules/object-deep-merge": { "version": "2.0.0", @@ -3915,7 +3815,6 @@ "dev": true, "license": "MIT", "optional": true, - "peer": true, "dependencies": { "entities": "^6.0.0" }, @@ -4138,6 +4037,7 @@ "integrity": "sha512-w8GmOxZfBmKknvdXU1sdM9NHcoQejwF/4mNgj2JuEEdRaHwwF12K7e9eXn1nLZ07ad+du76mkVsyeb2rKGllsA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@types/estree": "1.0.8" }, @@ -4198,8 +4098,7 @@ "integrity": "sha512-guoltQEx+9aMf2gDZ0s62EcV8lsXR+0w8915TC3ITdn2YueuNjdAYh/levpU9nFaoChh9RUS5ZdQMrKfVEN9tw==", "dev": true, "license": "MIT", - "optional": true, - "peer": true + "optional": true }, "node_modules/run-parallel": { "version": "1.2.0", @@ -4255,8 +4154,7 @@ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true, - "optional": true, - "peer": true + "optional": true }, "node_modules/saxes": { "version": "6.0.0", @@ -4264,7 +4162,6 @@ "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==", "dev": true, "optional": true, - "peer": true, "dependencies": { "xmlchars": "^2.2.0" }, @@ -4483,8 +4380,7 @@ "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", "dev": true, - "optional": true, - "peer": true + "optional": true }, "node_modules/terser": { "version": "5.17.7", @@ -4557,7 +4453,6 @@ "dev": true, "license": "MIT", "optional": true, - "peer": true, "dependencies": { "tldts-core": "^6.1.86" }, @@ -4571,8 +4466,7 @@ "integrity": "sha512-Je6p7pkk+KMzMv2XXKmAE3McmolOQFdxkKw0R8EYNr7sELW46JqnNeTX8ybPiQgvg1ymCoF8LXs5fzFaZvJPTA==", "dev": true, "license": "MIT", - "optional": true, - "peer": true + "optional": true }, "node_modules/to-regex-range": { "version": "5.0.1", @@ -4621,7 +4515,6 @@ "dev": true, "license": "BSD-3-Clause", "optional": true, - "peer": true, "dependencies": { "tldts": "^6.1.32" }, @@ -4636,7 +4529,6 @@ "dev": true, "license": "MIT", "optional": true, - "peer": true, "dependencies": { "punycode": "^2.3.1" }, @@ -4704,7 +4596,8 @@ "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "dev": true + "dev": true, + "peer": true }, "node_modules/type-check": { "version": "0.4.0", @@ -4724,6 +4617,7 @@ "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "dev": true, "license": "Apache-2.0", + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -4761,6 +4655,7 @@ "integrity": "sha512-NL8jTlbo0Tn4dUEXEsUg8KeyG/Lkmc4Fnzb8JXN/Ykm9G4HNImjtABMJgkQoVjOBN/j2WAwDTRytdqJbZsah7w==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.5.0", @@ -4836,6 +4731,7 @@ "integrity": "sha512-QSD4I0fN6uZQfftryIXuqvqgBxTvJ3ZNkF6RWECd82YGAYAfhcppBLFXzXJHQAAhVFyYEuFTrq6h0hQqjB7jIQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@vitest/expect": "4.0.13", "@vitest/mocker": "4.0.13", @@ -4919,7 +4815,6 @@ "dev": true, "license": "MIT", "optional": true, - "peer": true, "dependencies": { "xml-name-validator": "^5.0.0" }, @@ -4934,7 +4829,6 @@ "dev": true, "license": "BSD-2-Clause", "optional": true, - "peer": true, "engines": { "node": ">=12" } @@ -4946,7 +4840,6 @@ "dev": true, "license": "MIT", "optional": true, - "peer": true, "dependencies": { "iconv-lite": "0.6.3" }, @@ -4961,7 +4854,6 @@ "dev": true, "license": "MIT", "optional": true, - "peer": true, "engines": { "node": ">=18" } @@ -4973,7 +4865,6 @@ "dev": true, "license": "MIT", "optional": true, - "peer": true, "dependencies": { "tr46": "^5.1.0", "webidl-conversions": "^7.0.0" @@ -5038,7 +4929,6 @@ "dev": true, "license": "MIT", "optional": true, - "peer": true, "engines": { "node": ">=10.0.0" }, @@ -5062,7 +4952,6 @@ "dev": true, "license": "Apache-2.0", "optional": true, - "peer": true, "engines": { "node": ">=18" } @@ -5072,8 +4961,7 @@ "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", "dev": true, - "optional": true, - "peer": true + "optional": true }, "node_modules/y18n": { "version": "5.0.8", diff --git a/package.json b/package.json index c30fcc5c8..608ce2fa9 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 --dev-addr 0.0.0.0:8000", + "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", From 44aea2cc4102b8075cfa5548c9f57938d5ff098f Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Sun, 30 Nov 2025 05:56:02 +0100 Subject: [PATCH 2/6] reword some parts of the docs --- README.md | 33 +++++++++++++++++++++------------ package.json | 2 +- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index ad7a27c2d..d8d4039c5 100644 --- a/README.md +++ b/README.md @@ -16,27 +16,31 @@ The style specification is used in MapLibre GL JS and in MapLibre Native. Our lo If you want to contribute to the style specification, please open an issue with a design proposal. Once your design proposal has been accepted, you can open a pull request and implement your changes. -We aim to avoid breaking changes in the MapLibre style specification, because it makes life easier for our users. +We aim to avoid breaking changes in the MapLibre style specification because it makes life easier for our users. ## Documentation -The [documentation](https://maplibre.org/maplibre-style-spec) of the style specification also lives in this repository. We use [Zensical](https://www.zensical.org/). +The [documentation](https://maplibre.org/maplibre-style-spec) of the style specification also lives in this repository. +We use [Zensical](https://www.zensical.org/). -To work on the documentation locally, you need to have Docker installed and running. Start Zensical 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 docs ``` -Most of the documentation is generated (from e.g. `v8.json`). In another terminal, run: +Most of the documentation is generated (from e.g. `v8.json`). +In another terminal, run: -``` +```bash WATCH=1 npm run generate-docs ``` This will re-run the generation script when needed. -Note that generated files should not be checked in and they are excluded in `.gitignore`. Make sure to keep this file up-to-date and ignore generated files while making sure static Markdown files are not ignored. +Note that generated files should not be checked in, and they are excluded in `.gitignore`. +Make sure to keep this file up to date and ignore generated files while making sure static Markdown files are not ignored. ## NPM Package @@ -44,18 +48,23 @@ Note that generated files should not be checked in and they are excluded in `.gi The MapLibre style specification and utilities are published as a separate npm package so that they can be installed without the bulk of GL JS. - npm install @maplibre/maplibre-gl-style-spec +```bash +npm install @maplibre/maplibre-gl-style-spec +``` ## CLI Tools If you install this package globally, you will have access to several CLI tools. - npm install @maplibre/maplibre-gl-style-spec --global +```bash +npm install @maplibre/maplibre-gl-style-spec --global +``` ### `gl-style-migrate` This repo contains scripts for migrating GL styles of any version to the latest version -(currently v8). Migrate a style like this: +(currently v8). +You can migrate a style like this: ```bash $ gl-style-migrate bright-v7.json > bright-v8.json @@ -82,5 +91,5 @@ Will format the given style JSON to use standard indentation and sorted object k $ gl-style-validate style.json ``` -Will validate the given style JSON and print errors to stdout. Provide a -`--json` flag to get JSON output. +Will validate the given style JSON and print errors to stdout. +Provide a `--json` flag to get JSON output. diff --git a/package.json b/package.json index 608ce2fa9..2f1cd09f0 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "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", - "docs": "uvx zensical serve --dev-addr 0.0.0.0:8000", + "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", From b0bf7123497688c0ff75b130f957a8d42078a2eb Mon Sep 17 00:00:00 2001 From: Birk Skyum Date: Sun, 30 Nov 2025 13:06:48 +0100 Subject: [PATCH 3/6] dockerfile --- .gitignore | 4 +++- docs/Dockerfile | 29 +++++++++++++++++++++++++++++ docs/docker-compose.yml | 18 ++++++++++++++++++ 3 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 docs/Dockerfile create mode 100644 docs/docker-compose.yml diff --git a/.gitignore b/.gitignore index 1cf408f6e..6edfc1880 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,6 @@ docs/* !docs/README.md !docs/types.md !docs/sprite.md -!docs/deprecations.md \ No newline at end of file +!docs/deprecations.md +!docs/Dockerfile +!docs/docker-compose.yml \ No newline at end of file diff --git a/docs/Dockerfile b/docs/Dockerfile new file mode 100644 index 000000000..5111ab5e0 --- /dev/null +++ b/docs/Dockerfile @@ -0,0 +1,29 @@ +# Dockerfile for running MapLibre Style Spec documentation locally +# Usage (from repo root): +# docker build -f docs/Dockerfile -t maplibre-style-spec-docs . +# docker run -p 8000:8000 maplibre-style-spec-docs + +FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim + +# Install Node.js 22 +RUN apt-get update && apt-get install -y \ + curl \ + && curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \ + && apt-get install -y nodejs \ + && rm -rf /var/lib/apt/lists/* + +WORKDIR /app + +# Copy everything (need source files for npm prepare script) +COPY . . + +# Install npm dependencies (with --ignore-scripts to avoid prepare, then run it manually) +RUN npm ci --ignore-scripts \ + && npm run generate-style-spec \ + && npm run generate-docs + +# Expose the default MkDocs port +EXPOSE 8000 + +# Run the docs server +CMD ["uvx", "zensical", "serve", "--dev-addr", "0.0.0.0:8000"] diff --git a/docs/docker-compose.yml b/docs/docker-compose.yml new file mode 100644 index 000000000..7d62aade6 --- /dev/null +++ b/docs/docker-compose.yml @@ -0,0 +1,18 @@ +# Docker Compose for running MapLibre Style Spec documentation +# Usage (from repo root): +# docker compose -f docs/docker-compose.yml up --build +# +# For development with live reload (watches local files): +# docker compose -f docs/docker-compose.yml up + +services: + docs: + build: + context: .. + dockerfile: docs/Dockerfile + ports: + - "8000:8000" + volumes: + # Mount docs and mkdocs config for live reload + - ../docs:/app/docs:ro + - ../mkdocs.yml:/app/mkdocs.yml:ro From 3e9a4a4edcfc069fc66c9d7c9cede813e380d0e3 Mon Sep 17 00:00:00 2001 From: Birk Skyum Date: Sun, 30 Nov 2025 13:30:12 +0100 Subject: [PATCH 4/6] Revert "dockerfile" This reverts commit b0bf7123497688c0ff75b130f957a8d42078a2eb. --- .gitignore | 4 +--- docs/Dockerfile | 29 ----------------------------- docs/docker-compose.yml | 18 ------------------ 3 files changed, 1 insertion(+), 50 deletions(-) delete mode 100644 docs/Dockerfile delete mode 100644 docs/docker-compose.yml diff --git a/.gitignore b/.gitignore index 6edfc1880..1cf408f6e 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,4 @@ docs/* !docs/README.md !docs/types.md !docs/sprite.md -!docs/deprecations.md -!docs/Dockerfile -!docs/docker-compose.yml \ No newline at end of file +!docs/deprecations.md \ No newline at end of file diff --git a/docs/Dockerfile b/docs/Dockerfile deleted file mode 100644 index 5111ab5e0..000000000 --- a/docs/Dockerfile +++ /dev/null @@ -1,29 +0,0 @@ -# Dockerfile for running MapLibre Style Spec documentation locally -# Usage (from repo root): -# docker build -f docs/Dockerfile -t maplibre-style-spec-docs . -# docker run -p 8000:8000 maplibre-style-spec-docs - -FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim - -# Install Node.js 22 -RUN apt-get update && apt-get install -y \ - curl \ - && curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \ - && apt-get install -y nodejs \ - && rm -rf /var/lib/apt/lists/* - -WORKDIR /app - -# Copy everything (need source files for npm prepare script) -COPY . . - -# Install npm dependencies (with --ignore-scripts to avoid prepare, then run it manually) -RUN npm ci --ignore-scripts \ - && npm run generate-style-spec \ - && npm run generate-docs - -# Expose the default MkDocs port -EXPOSE 8000 - -# Run the docs server -CMD ["uvx", "zensical", "serve", "--dev-addr", "0.0.0.0:8000"] diff --git a/docs/docker-compose.yml b/docs/docker-compose.yml deleted file mode 100644 index 7d62aade6..000000000 --- a/docs/docker-compose.yml +++ /dev/null @@ -1,18 +0,0 @@ -# Docker Compose for running MapLibre Style Spec documentation -# Usage (from repo root): -# docker compose -f docs/docker-compose.yml up --build -# -# For development with live reload (watches local files): -# docker compose -f docs/docker-compose.yml up - -services: - docs: - build: - context: .. - dockerfile: docs/Dockerfile - ports: - - "8000:8000" - volumes: - # Mount docs and mkdocs config for live reload - - ../docs:/app/docs:ro - - ../mkdocs.yml:/app/mkdocs.yml:ro From 85ab5aabe40f7d0ba2eead557b70242d959242ae Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Sun, 30 Nov 2025 14:03:27 +0100 Subject: [PATCH 5/6] revert changes to package-lock From 1a40327e3c155bbed2570688900b30d65299b8d9 Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Sun, 30 Nov 2025 14:04:25 +0100 Subject: [PATCH 6/6] revert package-lock changes --- package-lock.json | 152 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 132 insertions(+), 20 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4cbbfbbeb..558eb3e4b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -69,6 +69,7 @@ "dev": true, "license": "MIT", "optional": true, + "peer": true, "dependencies": { "@csstools/css-calc": "^2.1.3", "@csstools/css-color-parser": "^3.0.9", @@ -166,6 +167,7 @@ ], "license": "MIT-0", "optional": true, + "peer": true, "engines": { "node": ">=18" } @@ -187,6 +189,7 @@ ], "license": "MIT", "optional": true, + "peer": true, "engines": { "node": ">=18" }, @@ -212,6 +215,7 @@ ], "license": "MIT", "optional": true, + "peer": true, "dependencies": { "@csstools/color-helpers": "^5.0.2", "@csstools/css-calc": "^2.1.3" @@ -224,6 +228,53 @@ "@csstools/css-tokenizer": "^3.0.3" } }, + "node_modules/@csstools/css-parser-algorithms": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-3.0.4.tgz", + "integrity": "sha512-Up7rBoV77rv29d3uKHUIVubz1BTcgyUK72IvCQAbfbMv584xHcGKCKbWh7i8hPrRJ7qU4Y8IO3IY9m+iTB7P3A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "optional": true, + "peer": true, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@csstools/css-tokenizer": "^3.0.3" + } + }, + "node_modules/@csstools/css-tokenizer": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-3.0.3.tgz", + "integrity": "sha512-UJnjoFsmxfKUdNYdWgOB0mWUypuLvAfQPH1+pyvRJs6euowbFkFC6P13w1l8mJyi3vxYMxc9kld5jZEGRQs6bw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "license": "MIT", + "optional": true, + "peer": true, + "engines": { + "node": ">=18" + } + }, "node_modules/@es-joy/jsdoccomment": { "version": "0.76.0", "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.76.0.tgz", @@ -1748,7 +1799,6 @@ "integrity": "sha512-GNWcUTRBgIRJD5zj+Tq0fKOJ5XZajIiBroOF0yvj2bSU1WvNdYS/dn9UxwsujGW4JX06dnHyjV2y9rRaybH0iQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "undici-types": "~7.16.0" } @@ -1805,7 +1855,6 @@ "integrity": "sha512-lJi3PfxVmo0AkEY93ecfN+r8SofEqZNGByvHAI3GBLrvt1Cw6H5k1IM02nSzu0RfUafr2EvFSw0wAsZgubNplQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "8.47.0", "@typescript-eslint/types": "8.47.0", @@ -2202,7 +2251,6 @@ "integrity": "sha512-MFV6GhTflgBj194+vowTB2iLI5niMZhqiW7/NV7U4AfWbX/IAtsq4zA+gzCLyGzpsQUdJlX26hrQ1vuWShq2BQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@vitest/utils": "4.0.13", "fflate": "^0.8.2", @@ -2239,7 +2287,6 @@ "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, "license": "MIT", - "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -2272,6 +2319,7 @@ "dev": true, "license": "MIT", "optional": true, + "peer": true, "engines": { "node": ">= 14" } @@ -2521,6 +2569,7 @@ "dev": true, "license": "MIT", "optional": true, + "peer": true, "dependencies": { "@asamuzakjp/css-color": "^3.1.2", "rrweb-cssom": "^0.8.0" @@ -2536,6 +2585,7 @@ "dev": true, "license": "MIT", "optional": true, + "peer": true, "dependencies": { "whatwg-mimetype": "^4.0.0", "whatwg-url": "^14.0.0" @@ -2568,7 +2618,8 @@ "integrity": "sha512-8vDa8Qxvr/+d94hSh5P3IJwI5t8/c0KsMp+g8bNw9cY2icONa5aPfvKeieW1WlG0WQYwwhJ7mjui2xtiePQSXw==", "dev": true, "license": "MIT", - "optional": true + "optional": true, + "peer": true }, "node_modules/deep-is": { "version": "0.1.4", @@ -2623,6 +2674,7 @@ "dev": true, "license": "BSD-2-Clause", "optional": true, + "peer": true, "engines": { "node": ">=0.12" }, @@ -2694,7 +2746,6 @@ "integrity": "sha512-BhHmn2yNOFA9H9JmmIVKJmd288g9hrVRDkdoIgRCRuSySRUHH7r/DI6aAXW9T1WwUuY3DFgrcaqB+deURBLR5g==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", @@ -3257,6 +3308,7 @@ "dev": true, "license": "MIT", "optional": true, + "peer": true, "dependencies": { "whatwg-encoding": "^3.1.1" }, @@ -3295,6 +3347,7 @@ "dev": true, "license": "MIT", "optional": true, + "peer": true, "dependencies": { "agent-base": "^7.1.0", "debug": "^4.3.4" @@ -3310,6 +3363,7 @@ "dev": true, "license": "MIT", "optional": true, + "peer": true, "dependencies": { "agent-base": "^7.1.2", "debug": "4" @@ -3324,6 +3378,7 @@ "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", "dev": true, "optional": true, + "peer": true, "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" }, @@ -3442,7 +3497,8 @@ "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", "dev": true, - "optional": true + "optional": true, + "peer": true }, "node_modules/is-reference": { "version": "1.2.1", @@ -3515,6 +3571,48 @@ "node": ">=20.0.0" } }, + "node_modules/jsdom": { + "version": "26.1.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-26.1.0.tgz", + "integrity": "sha512-Cvc9WUhxSMEo4McES3P7oK3QaXldCfNWp7pl2NNeiIFlCoLr3kfq9kb1fxftiwk1FLV7CvpvDfonxtzUDeSOPg==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "cssstyle": "^4.2.1", + "data-urls": "^5.0.0", + "decimal.js": "^10.5.0", + "html-encoding-sniffer": "^4.0.0", + "http-proxy-agent": "^7.0.2", + "https-proxy-agent": "^7.0.6", + "is-potential-custom-element-name": "^1.0.1", + "nwsapi": "^2.2.16", + "parse5": "^7.2.1", + "rrweb-cssom": "^0.8.0", + "saxes": "^6.0.0", + "symbol-tree": "^3.2.4", + "tough-cookie": "^5.1.1", + "w3c-xmlserializer": "^5.0.0", + "webidl-conversions": "^7.0.0", + "whatwg-encoding": "^3.1.1", + "whatwg-mimetype": "^4.0.0", + "whatwg-url": "^14.1.1", + "ws": "^8.18.0", + "xml-name-validator": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "canvas": "^3.0.0" + }, + "peerDependenciesMeta": { + "canvas": { + "optional": true + } + } + }, "node_modules/json-buffer": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", @@ -3573,7 +3671,8 @@ "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", "dev": true, "license": "ISC", - "optional": true + "optional": true, + "peer": true }, "node_modules/magic-string": { "version": "0.30.21", @@ -3737,7 +3836,8 @@ "integrity": "sha512-/ieB+mDe4MrrKMT8z+mQL8klXydZWGR5Dowt4RAGKbJ3kIGEx3X4ljUo+6V73IXtUPWgfOlU5B9MlGxFO5T+cA==", "dev": true, "license": "MIT", - "optional": true + "optional": true, + "peer": true }, "node_modules/object-deep-merge": { "version": "2.0.0", @@ -3815,6 +3915,7 @@ "dev": true, "license": "MIT", "optional": true, + "peer": true, "dependencies": { "entities": "^6.0.0" }, @@ -4037,7 +4138,6 @@ "integrity": "sha512-w8GmOxZfBmKknvdXU1sdM9NHcoQejwF/4mNgj2JuEEdRaHwwF12K7e9eXn1nLZ07ad+du76mkVsyeb2rKGllsA==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@types/estree": "1.0.8" }, @@ -4098,7 +4198,8 @@ "integrity": "sha512-guoltQEx+9aMf2gDZ0s62EcV8lsXR+0w8915TC3ITdn2YueuNjdAYh/levpU9nFaoChh9RUS5ZdQMrKfVEN9tw==", "dev": true, "license": "MIT", - "optional": true + "optional": true, + "peer": true }, "node_modules/run-parallel": { "version": "1.2.0", @@ -4154,7 +4255,8 @@ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true, - "optional": true + "optional": true, + "peer": true }, "node_modules/saxes": { "version": "6.0.0", @@ -4162,6 +4264,7 @@ "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==", "dev": true, "optional": true, + "peer": true, "dependencies": { "xmlchars": "^2.2.0" }, @@ -4380,7 +4483,8 @@ "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", "dev": true, - "optional": true + "optional": true, + "peer": true }, "node_modules/terser": { "version": "5.17.7", @@ -4453,6 +4557,7 @@ "dev": true, "license": "MIT", "optional": true, + "peer": true, "dependencies": { "tldts-core": "^6.1.86" }, @@ -4466,7 +4571,8 @@ "integrity": "sha512-Je6p7pkk+KMzMv2XXKmAE3McmolOQFdxkKw0R8EYNr7sELW46JqnNeTX8ybPiQgvg1ymCoF8LXs5fzFaZvJPTA==", "dev": true, "license": "MIT", - "optional": true + "optional": true, + "peer": true }, "node_modules/to-regex-range": { "version": "5.0.1", @@ -4515,6 +4621,7 @@ "dev": true, "license": "BSD-3-Clause", "optional": true, + "peer": true, "dependencies": { "tldts": "^6.1.32" }, @@ -4529,6 +4636,7 @@ "dev": true, "license": "MIT", "optional": true, + "peer": true, "dependencies": { "punycode": "^2.3.1" }, @@ -4596,8 +4704,7 @@ "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "dev": true, - "peer": true + "dev": true }, "node_modules/type-check": { "version": "0.4.0", @@ -4617,7 +4724,6 @@ "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "dev": true, "license": "Apache-2.0", - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -4655,7 +4761,6 @@ "integrity": "sha512-NL8jTlbo0Tn4dUEXEsUg8KeyG/Lkmc4Fnzb8JXN/Ykm9G4HNImjtABMJgkQoVjOBN/j2WAwDTRytdqJbZsah7w==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.5.0", @@ -4731,7 +4836,6 @@ "integrity": "sha512-QSD4I0fN6uZQfftryIXuqvqgBxTvJ3ZNkF6RWECd82YGAYAfhcppBLFXzXJHQAAhVFyYEuFTrq6h0hQqjB7jIQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@vitest/expect": "4.0.13", "@vitest/mocker": "4.0.13", @@ -4815,6 +4919,7 @@ "dev": true, "license": "MIT", "optional": true, + "peer": true, "dependencies": { "xml-name-validator": "^5.0.0" }, @@ -4829,6 +4934,7 @@ "dev": true, "license": "BSD-2-Clause", "optional": true, + "peer": true, "engines": { "node": ">=12" } @@ -4840,6 +4946,7 @@ "dev": true, "license": "MIT", "optional": true, + "peer": true, "dependencies": { "iconv-lite": "0.6.3" }, @@ -4854,6 +4961,7 @@ "dev": true, "license": "MIT", "optional": true, + "peer": true, "engines": { "node": ">=18" } @@ -4865,6 +4973,7 @@ "dev": true, "license": "MIT", "optional": true, + "peer": true, "dependencies": { "tr46": "^5.1.0", "webidl-conversions": "^7.0.0" @@ -4929,6 +5038,7 @@ "dev": true, "license": "MIT", "optional": true, + "peer": true, "engines": { "node": ">=10.0.0" }, @@ -4952,6 +5062,7 @@ "dev": true, "license": "Apache-2.0", "optional": true, + "peer": true, "engines": { "node": ">=18" } @@ -4961,7 +5072,8 @@ "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", "dev": true, - "optional": true + "optional": true, + "peer": true }, "node_modules/y18n": { "version": "5.0.8",