mirror of
https://github.com/ClementTsang/bottom.git
synced 2026-08-28 14:26:35 +00:00
docs: add script to serve mkdocs locally
This commit is contained in:
@@ -7,6 +7,8 @@ Documentation is currently built using Python 3.11, though it should work fine w
|
|||||||
|
|
||||||
## Running locally
|
## Running locally
|
||||||
|
|
||||||
|
One way is to just run `serve.sh`. Alternatively, the manual steps are:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Change directories to the documentation.
|
# Change directories to the documentation.
|
||||||
cd docs/
|
cd docs/
|
||||||
|
|||||||
Executable
+20
@@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
VENV_PATH="./venv/"
|
||||||
|
PYTHON_CMD=${1:-python}
|
||||||
|
|
||||||
|
if [ ! -d $VENV_PATH ]; then
|
||||||
|
echo "venv not found, creating one using the command '${PYTHON_CMD}'...";
|
||||||
|
$PYTHON_CMD -m venv venv;
|
||||||
|
source ./venv/bin/activate;
|
||||||
|
pip install --upgrade pip;
|
||||||
|
pip install -r requirements.txt;
|
||||||
|
./venv/bin/mkdocs serve;
|
||||||
|
else
|
||||||
|
echo "venv already found.";
|
||||||
|
source ./venv/bin/activate;
|
||||||
|
./venv/bin/mkdocs serve;
|
||||||
|
fi;
|
||||||
|
|
||||||
Reference in New Issue
Block a user