Setting up the website development environment
This website is developed using mkdocs using the Material theme. This guide will run you through the steps of setting it up.
Installing Python¶
You can download Python from the official website. You will need at least Python 3.8.
Cloning the repository¶
In order to develop this website you will need to clone the repository:
git clone https://github.com/containerssh/containerssh.github.io
Creating a venv¶
Once you have all that done we recommend you create a venv to avoid polluting your computer with packages:
python3 -m venv /path/to/containerssh.github.io
You can then activate the venv using the following script:
venv/Scripts/activate
Installing the dependencies¶
Now you need to install the dependencies:
pip install -r requirements.txt
Optional: Setting the GITHUB_TOKEN
¶
Some functions of the website require a working GitHub Token without any special permissions. You can create a token here.
You can then set the token using the command line:
export GITHUB_TOKEN="your-token-here"
$env:GITHUB_TOKEN="your-token-here"
set GITHUB_TOKEN=your-token-here
Warning
Setting GITHUB_TOKEN
dramatically slows down the development server because the GitHub API is queried for every refresh. Only set it when you need it.
Running the dev server¶
Run the following command to get a dev server up and running:
python -m mkdocs serve
This will start the development server on localhost:8000.
Tip
We recommend using the free Visual Studio Code or the PyCharm Community Edition as a development environment for the website.