diff options
-rw-r--r-- | docs/content/contribution/documentation.md | 21 | ||||
-rw-r--r-- | docs/mkdocs.yml | 2 | ||||
-rw-r--r-- | docs/requirements.txt | 2 | ||||
-rwxr-xr-x | docs/serve.sh | 4 |
4 files changed, 12 insertions, 17 deletions
diff --git a/docs/content/contribution/documentation.md b/docs/content/contribution/documentation.md index 27815293..8922922a 100644 --- a/docs/content/contribution/documentation.md +++ b/docs/content/contribution/documentation.md @@ -31,14 +31,14 @@ There are a few areas where documentation changes are often needed: <h3>Help menu</h3> - For changes to the help menu, try to refer to the existing code within `src/constants.rs` on how the help menu is generated. + For changes to the help menu, try to refer to the existing code within [`src/constants.rs`](https://github.com/ClementTsang/bottom/blob/master/src/constants.rs) on how the help menu is generated. <h3>Extended documentation</h3> - For changes to the extended documentation, you'll probably want Python 3.11 (older versions should be fine though), - [MkDocs](https://www.mkdocs.org/), [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/), - `mdx_truly_sane_lists`, and optionally [Mike](https://github.com/jimporter/mike) installed to provide live reloading - and preview for your changes. They aren't needed, but it'll help with validating your changes. + For changes to the extended documentation, you'll probably want at least Python 3.11 (older versions should be fine + though), [MkDocs](https://www.mkdocs.org/), [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/), + `mdx_truly_sane_lists`, and optionally [Mike](https://github.com/jimporter/mike) installed. These can help with + validating your changes locally. You can do so through `pip` or your system's package managers. If you use `pip`, you can use venv to cleanly install the documentation dependencies: @@ -47,15 +47,8 @@ There are a few areas where documentation changes are often needed: # Change directories to the documentation. cd docs/ - # Create and activate venv. - python -m venv venv - source venv/bin/activate - - # Install requirements - pip install -r requirements.txt - - # Run mkdocs - venv/bin/mkdocs serve + # Create venv, install the dependencies, and serve the page. + ./serve.sh ``` This will serve a local version of the docs that you can open on your browser. It will update as you make changes. diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index a58622b8..f59e9ddc 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -113,6 +113,8 @@ markdown_extensions: plugins: - tags - search + - mike: + canonical_version: stable extra: # Versioning diff --git a/docs/requirements.txt b/docs/requirements.txt index dc85b544..cd64ee4a 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -2,5 +2,5 @@ mkdocs == 1.5.3 mkdocs-material == 9.4.8 mkdocs-material-extensions == 1.3 mdx_truly_sane_lists == 1.3 -mike == 1.1.2 +mike == 2.0.0 diff --git a/docs/serve.sh b/docs/serve.sh index ad833056..126cace9 100755 --- a/docs/serve.sh +++ b/docs/serve.sh @@ -11,10 +11,10 @@ if [ ! -d $VENV_PATH ]; then source ./venv/bin/activate; pip install --upgrade pip; pip install -r requirements.txt; - ./venv/bin/mkdocs serve; + ./venv/bin/mike serve; else echo "venv already found."; source ./venv/bin/activate; - ./venv/bin/mkdocs serve; + ./venv/bin/mike serve; fi; |