#TIL 41 - How to deploy old legacy documentation with MkDocs
The process starts with cloning the GitHub repository that contains the documentation you want to deploy. For example, to clone the markdown docs from the typeorm/typeorm repository, we use the npx degit
command.
npx degit typeorm/typeorm#0.2.38
Next, we install mkdocs
using pip
, which is a Python package installer.
We then set up a theme for our document page by creating a mkdocs.yml
file with some basic configuration including the site's name and URL, and the desired theme.
site_name: TypeORM v0.2.38
site_url: https://typeorm-legacy.productsway.com/
theme: readthedocs
Following this, we use the mkdocs build
command to create a static site, and then npx vercel site
to deploy the site on Vercel. Vercel returns a live URL for our documentation.
This process enables us to effectively host and display older versions of documents, making it easier for users to find and reference previous versions of the information.
Demo: TypeORM v0.2.38 https://typeorm-02-38.onrender.com/
Usage:
https://github.com/jellydn/mkdocs-legacy-deployment