ADR-0009: Website built with Vite and TypeScript, hosted on CloudflareLink to the section ADR-0009: Website built with Vite and TypeScript, hosted on Cloudflare
On this page
Status: Accepted 2026-10-15 (project sponsor) Date: 2026-10-15 Profiles affected: none (website only) Supersedes: decision 4 of ADR-0008. Its other decisions stand.
ContextLink to the section Context
ADR-0008 had the website generated by MkDocs and deployed to GitHub Pages. GitHub Pages was never enabled (for a private repository on a personal account it needs GitHub Pro), so nothing was published. On 2026-10-15 the project sponsor decided to host univip.org on Cloudflare and to build the site with TypeScript and Vite, so that the build output can be uploaded directly to Cloudflare Workers or Cloudflare Pages.
Options consideredLink to the section Options considered
- Keep MkDocs and upload its output to Cloudflare. The least work. It keeps a Python toolchain for the site, and the Material theme is tied to MkDocs 1.6 because MkDocs 2.0 removes the plugin and theming systems it depends on.
- A documentation framework built on Vite (VitePress, Astro Starlight). Search, navigation and theming come ready-made. It brings a UI framework (Vue or Astro) and its conventions into a repository that has none.
- A small Vite plugin in TypeScript that renders the repository's Markdown. No UI framework, and the link rules are plain code in
site/src/build/. There is more code for the project to own.
DecisionLink to the section Decision
Option 3.
site/is a Vite and TypeScript project.npm run buildrenders the repository intosite/dist/: static HTML, the client script and styles, the schemas at their$idURLs, the OpenAPI description, the examples,404.html,sitemap.xml,robots.txtand_headers.site/dist/is deployed unchanged to Cloudflare Workers (static assets, configured bysite/wrangler.jsonc) or Cloudflare Pages (Direct Upload orwrangler pages deploy), with the custom domainunivip.org. No server-side code runs.- The build fails on a broken link or heading anchor, on a published page missing from the navigation, and on a schema whose
$iddiffers from the URL it is published at. - Links keep working on GitHub. Markdown files link to each other with relative paths and GitHub-style heading anchors, and the build maps them to site URLs.
- The repository stays the single source of truth; nothing is edited on the website directly.
ConsequencesLink to the section Consequences
- MkDocs,
tools/build_site.py,site/mkdocs.ymlandsite/requirements.txtare removed. Thesiteworkflow builds and checks the site with Node and keepssite/dist/as a downloadable artifact. It no longer deploys to GitHub Pages. - Page URLs have neither a trailing slash nor
.html(/spec/0.2/07-telemetry); directory indexes end in/(/spec/0.2/). Problem type URIs (https://univip.org/problems/<slug>) resolve without a redirect. Nothing was ever published under the MkDocs layout, so no URL breaks. - Cloudflare serves the headers in
_headers: cross-origin access to the schemas, the API description and the examples (Pages sends it by default, Workers does not), a content security policy, and long-lived caching for hashed assets. - DNS for
univip.orgis served by Cloudflare or points at it.site/README.mdgives the steps. - Building the site needs Node 22.12 or later.
Open questionsLink to the section Open questions
- Earlier versions must stay online once a later one is published (ADR-0008 decision 5). The build publishes only the current version, so this is needed before the first version is tagged.
- Whether CI deploys automatically, which needs a Cloudflare API token as a repository secret, or the sponsor uploads each build.