Deploy a MkDocs website
MkDocs is a static site generator that’s geared towards project documentation. It allows you to write your documentation in Markdown and build a static website from it.
Requirements
To create an example project, install Git and uv, then run MkDocs with uvx:
uvx mkdocs new myStaticAppDeploy a static application
You can create an application in our Console or through Clever Tools. Install them with npm or any supported package manager:
# Install with npm or any supported method
npm i -g clever-tools
# Login to Clever Cloud and check it worked
clever login
clever profileGo to the folder where you want to create your application, initialize a Git repository and create the linked application:
cd myStaticApp
git init
clever create -t staticTo deploy on Clever Cloud, your local folder needs to be an initialized Git repository linked to an application. If you already have an application on Clever Cloud and want to link it to the current local folder:
clever link your_app_name_or_IDAutomatic build
MkDocs is one of the static site generators supported by the Static runtime automatic build, so you don’t need any additional build configuration.
Push your code
Once you complete these steps, commit your content to the local repository and deploy it:
git add .
git commit -m "First deploy"
clever deploy
clever openYou can display your website’s URL or add a custom domain to it (you’ll need to configure DNS):
clever domain
clever domain add your.website.tld404 page location
If you need to use a specific page for 404 errors, define its location with the SERVER_ERROR_PAGE_404 environment variable from Static Web Server, used by default in the Static runtime. For example: SERVER_ERROR_PAGE_404=404.html.