Skip to content

Commit

Permalink
mkdocs venv
Browse files Browse the repository at this point in the history
  • Loading branch information
milesstoetzner authored Dec 31, 2023
1 parent 61aeb55 commit d28fbf5
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
9 changes: 9 additions & 0 deletions docs/cmds/mkdocs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ if [ -f ".env" ]; then
source .env
fi

# Ensure that mkdocs is installed
if [ ! -d ".venv" ]; then
echo "venv does not exist"
exit 1
fi

# Activate venv
. .venv/bin/activate

# Ensure that mkdocs is installed
if ! which mkdocs &>/dev/null; then
echo "\"mkdocs\" not installed"
Expand Down
3 changes: 2 additions & 1 deletion docs/docs/contributing/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ We use [Material for MkDocs](https://squidfunk.github.io/mkdocs-material){target
The files are located in the `docs` directory.
Custom macros are implemented in `docs/macros.py` using [mkdocs-macros](https://mkdocs-macros-plugin.readthedocs.io){target=_blank}.

First, install all dependencies, such as Python, [pandoc](https://pandoc.org){target=_blank}, mkdocs, PlantUML, etc. globally on your system.
First, install all dependencies.
This will install several apt packages on the system and mkdocs in a virtual environment.

```shell linenums="1"
yarn docs:install
Expand Down
1 change: 1 addition & 0 deletions docs/docs/contributing/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ Prettier should be configured as given in the figure below with the following pa
The following directories should be excluded from search by the IDE.

- `.nyc_output`
- `docs/.venv`
- `build`
- `build-docs`
- `coverage`
Expand Down
8 changes: 3 additions & 5 deletions docs/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,14 @@ cd "$(dirname "$0")"
sudo apt-get update -y

# Install python
sudo apt-get install python3 python3-pip python-is-python3 -y
sudo apt-get install python3 python3-pip python3-venv python-is-python3 -y

# Install requirements for PlantUML
sudo apt-get install default-jre graphviz -y

# Install pandoc
sudo apt-get install pandoc -y

# Install pv for demo magic
sudo apt-get install pv -y

# Install mkdocs
pip install -r requirements.txt
python3 -m venv .venv && . .venv/bin/activate
pip install -r requirements.txt

0 comments on commit d28fbf5

Please sign in to comment.