Deploy to Netlify
This guide explains how to deploy the MkDocs site in this repository to Netlify.
Prerequisites
- A Netlify account
- This repository pushed to a Git host Netlify can access (GitHub, GitLab, or Bitbucket)
Recommended setup (Git-based deploy)
- Push your latest changes to the main branch of your Git repository.
- In Netlify, select "Add new site" -> "Import an existing project".
- Choose your Git provider and pick the
cellrepo-user-manualrepo. - Set the build options:
- Build command:
pip install -r requirements.txt && mkdocs build - Publish directory:
site - Add an environment variable for Python:
PYTHON_VERSION=3.11(or another supported version)- Click "Deploy site".
Netlify will build the site and publish the contents of site/.
Add a requirements.txt (if you do not already have one)
Netlify does not install Python packages automatically. Add a requirements.txt file in the repository root with:
mkdocs
mkdocs-material
If you add MkDocs plugins later, include them here so Netlify installs them during the build.
Optional: netlify.toml (recommended for consistency)
You can store the build settings in a netlify.toml file so they are versioned with the repo:
[build]
command = "pip install -r requirements.txt && mkdocs build"
publish = "site"
[build.environment]
PYTHON_VERSION = "3.11"
Troubleshooting
- Build fails with "mkdocs: command not found": confirm the build command installs dependencies.
- Missing pages or assets: check that paths in
mkdocs.ymlanddocs/match and that the publish directory issite.