Deploying a Static Site with MkDocs and GitHub Pages
Prerequisites
- Python installed on your machine.
- A GitHub account with a repository for your project.
Steps
- Install MkDocs:
pip install mkdocs
pip install mkdocs-material
pip install pymdown-extensions
pip install mkdocs mkdocs-gitbook
pip install mkdocs-minify-plugin
pip install mkdocs-git-revision-date-localized-plugin
- Initialize MkDocs Project:
- Organize Markdown Files:
-
Place all markdown files in the
docsdirectory. -
Configure Navigation:
-
Edit
mkdocs.ymlto define the site's navigation. -
Build and Serve Locally:
- Deploy to GitHub Pages:
In the setting of the project, click page section, you will see visit pages
Additional Tips
- Ensure your GitHub repository is set up to use GitHub Pages.
- Check the
gh-pagesbranch for the deployed site content.