Technical documentation for services made available by geo.admin.ch.
To build and run the site locally:
- Make sure Node.js v18 or higher is installed (
node -v) - Install VitePress following the setup guide. Do not use the setup wizard, only install the package.
- Optional: Activate a suitable Node version, e.g. with
nvm use stableℹ️ Usenvm listto see all available Node versions - Run
npm installto locally install all the necessary packages - Run
npm run docs:devand visit http://localhost:5173/ in your web browser
This project uses the prettier package for formatting.
You can automatically run prettier with these commands:
npm run formatnpm run format:check
To add a release note, follow these steps:
-
Navigate to the
.releases/folder in the project directory. -
Create a new file with the following naming convention:
YYYYMMDD.md(e.g.,20250514.md). -
Add the following header to the file:
--- title: YYYYMMDD date: Day, Month DDth YYYY ---
Replace
YYYYMMDDwith the release date, and update thedatefield with the full date in a human-readable format. -
Add the markdown content for the release note below the header.
-
(Optional) If you do not want the release note to appear in the sidebar menu, add the following variable to the header:
ignoreSideBar: true
-
Save the file and commit your changes.
-
To edit the status banner, use the following variables located in the
status-page.mdfile:previewType: "info" previewTitle: "Issues in services" previewContent: "Our systems are experiencing issues"
-
Update the
previewTypevariable (infoorwarning) to control the color and the position in the page :info: bottom of the page, just text without backgound colorwarning: top of the page, yellow bannerdanger: top of the page, red banner
-
Save the file and commit your changes.
-
To edit the End-of-Life preview, use the following variables located in the
end-of-life.mdfile:previewTitle: "Decomissioning of legacy vectortile styles / tiles" previewContent: "Old styles for Light Base Map and Imagery Base Map no longer available from January 2025"
-
Save the file and commit your changes.