diff --git a/docs/deploy.md b/docs/deploy.md new file mode 100644 index 0000000..a609e05 --- /dev/null +++ b/docs/deploy.md @@ -0,0 +1,24 @@ +# Deploy +> How to deploy a MkDocs site + + +See [Deploying Your Docs](https://www.mkdocs.org/user-guide/deploying-your-docs/) on the Mkdocs site for more details. + + +## Github Pages + +_Note this is for a Project Page and not Organization and User Pages._ + +Run this command locally to deploy to Github Pages by building and pushing to `gh-pages` branch. + +```sh +mkdocs gh-deploy +``` + +See options: + +```sh +mkdocs gh-deploy --help +``` + +_Note you cannot view the site before its pushed, so use the `build` or `serve` commands for that._ diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..f9b2572 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,5 @@ +# MkDocs Quickstart + +A demo of a MkDocs docs site, including instructions for how to setup further sites. + +This is based on the [mkdocs.org/](https://www.mkdocs.org/) tutorial. diff --git a/docs/setup_and_run.md b/docs/setup_and_run.md new file mode 100644 index 0000000..04f03e8 --- /dev/null +++ b/docs/setup_and_run.md @@ -0,0 +1,43 @@ +# Setup and run +> How to setup and run the docs site + + +## Install + +Install in a virtual environment. + +```sh +pip install mkdocs +``` + + +## Server docs locally + +This will build the docs in memory (not to disk) and serve an auto-reloading server. + +```sh +mkdocs serve +``` + +Open URL: + +- [localhost:8000](http://localhost:8000) + + + +## Build docs + +Build docs site to `site` directory. + +```sh +mkdocs build +``` + +Useful for production build or simulating that locally. + + +Remove stale files. + +```sh +mkdocs build --clean +``` diff --git a/docs/tutorial.md b/docs/tutorial.md new file mode 100644 index 0000000..5fee6b3 --- /dev/null +++ b/docs/tutorial.md @@ -0,0 +1,26 @@ +# Tutorial +> How to create a MkDocs site. + +This is a summary of the tutorial on [mkdocs.org](https://www.mkdocs.org/). + + +### Setup site + +1. Create pages. + 1. Create `docs` directory. + 2. Create `index.md` + 3. Create other pages. +2. Setup config. + 1. Create `mkdocs.yml` at project root. + 2. Setup navbar in `mkdocs.yml`. + ```yaml + nav: + - Home: index.md + - About: about.md + ``` + 3. Choose a theme. + ```yaml + theme: readthedocs + ``` +3. Create a favicon. + - It will be picked up this path: `docs/img/favicon.ico`.