summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClement Tsang <34804052+ClementTsang@users.noreply.github.com>2023-11-16 03:17:21 -0500
committerGitHub <noreply@github.com>2023-11-16 03:17:21 -0500
commit036366274ea8649648e6af601f3320cc69fb3c0c (patch)
tree62c364589eaeb6bd52526a77775214353fbd7452
parent04713bf81d1ea6e50ae40b80b5ad38aa1c57ac8c (diff)
docs: bump mike to v2.0.0 (#1318)
* bump mike * bump some docs * update some settings and serve script to use mike
-rw-r--r--docs/content/contribution/documentation.md21
-rw-r--r--docs/mkdocs.yml2
-rw-r--r--docs/requirements.txt2
-rwxr-xr-xdocs/serve.sh4
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;