#TIL 41 - How to deploy old legacy documentation with MkDocs | ProductsWay

#TIL 41 - How to deploy old legacy documentation with MkDocs

Jul 14, 2023 · Dung Huynh

What

Deploy an older version of a project's documentation when the official site only shows the latest release.

Why

Projects like TypeORM retire old docs when they ship a major version, but you may still be on v0.2. Downloading a snapshot of a tagged release with degit, building it with MkDocs, and deploying to Vercel gives you a standalone docs site for the version you're actually running. The snapshot does not include Git history.

How

1. Download a specific version:

npx degit typeorm/typeorm#0.2.38 typeorm-legacy

2. Create mkdocs.yml:

site_name: TypeORM v0.2.38
site_url: https://your-url.com/
theme: readthedocs

3. Build and deploy:

pip install mkdocs
mkdocs build
npx vercel deploy

Demo: typeorm-02-38.onrender.com