Skip to content

Commit

Permalink
Adding local launch script. (#5)
Browse files Browse the repository at this point in the history
* Adding local launch script.
* Switching from pyenv virtual env to python -m venv - whoops
* Fixing link in README

Signed-off-by: Olivia Buzek <[email protected]>
  • Loading branch information
obuzek authored Sep 18, 2024
1 parent b0027fa commit b500662
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,27 @@
# docs.instructlab.ai

To test documentation changes locally, you'll need to install `mkdocs` and the relevant dependencies in your Python environment.

We've included a server launching script for ease of use.

## Getting Started

1. Create a virtual environment for your installation.

```bash
python -m venv venv-ilab-docs
source venv-ilab-docs/bin/activate
```

2. Launch the server.

This will:
* Install mkdocs
* Install the PyPI dependencies
* Launch the mkdocs server locally

```bash
./launch_server.sh
```

3. Visit [https://127.0.0.1:8000/](https://127.0.0.1:8000/) to see your changes in the browser.
13 changes: 13 additions & 0 deletions launch_server.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

# You may want to activate a new virtual environment before running this script, as it will install Python dependencies.

pip install -U mkdocs

reqs=$(mkdocs get-deps)

echo "Installing: " $reqs
pip install -U $reqs

echo "Starting server..."
mkdocs serve

0 comments on commit b500662

Please sign in to comment.