Skip to content

Instantly share code, notes, and snippets.

@hdsenevi
Last active April 24, 2022 14:24
Show Gist options
  • Save hdsenevi/7e1a25825e26c30b0fd60c0fdfc93818 to your computer and use it in GitHub Desktop.
Save hdsenevi/7e1a25825e26c30b0fd60c0fdfc93818 to your computer and use it in GitHub Desktop.
1. Install (pyenv)[https://github.com/pyenv/pyenv] (make sure to do install stesp after step #2 in readme)
1a. For M1 macs try (this)[https://laict.medium.com/install-python-on-macos-11-m1-apple-silicon-using-pyenv-12e0729427a9]
2. Install a latest version of python (3.8.10)
`pyenv install 3.10.3`
3. Set latest python version to be default
`pyenv global 3.10.3`
4. Install and/or verify pip is installed
`pip --version`
4a. Upgrade pip if needed
`pip3 install --upgrade pip`
5. Install mkdocs
`pip3 install mkdocs`
6. Install mkdocs-material
`pip3 install mkdocs-material`
7. Install mkdocs-awesome-pages-plugin
`pip3 install mkdocs-awesome-pages-plugin`
7. `mkdocs new PROJ_NAME`
8. Include the following in `mkdocs.yml` file
```
theme:
name: material
markdown_extensions:
- pymdownx.highlight
- pymdownx.superfences
plugins:
- search
- awesome-pages
```
9. `cd PROJ_NAME`
10. `mkdocs serve`
11. Create a file named `ghPagesDeploy.sh` in the root of the repo and include the following in it
```
#!/bin/bash
echo "Clean building docs"
mkdocs build --clean
echo "Clean build success"
echo "github pages deploy"
mkdocs gh-deploy
echo "github pages deploy success"
```
12. execute `ghPagesDeploy.sh` for maximum satifsaction
13. add a `.gitignore` file if you like to
```
site/
.DS_Store
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment