From 4b6a980275b69cfcce37f7c61908809b5eb24ee4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ricks?= Date: Thu, 1 Feb 2024 13:07:11 +0100 Subject: [PATCH] Change: Update README and add livehtml Improve the installation procedures in the README and add a section about running a auto-rebuild web server. --- README.md | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index eccef32e..1325a9ce 100644 --- a/README.md +++ b/README.md @@ -5,15 +5,25 @@ The documentation is build automatically via GitHub Actions and available at https://greenbone.github.io/docs/ -For a manual build locally [poetry](https://python-poetry.org/) is required. +## Requirements -First install poetry and the project dependencies with +For a manual build locally Python >= 3.9 and [poetry] is required. + +## Install Dependencies + +To install poetry it is recommended to use [pipx] +```sh +python3 -m pipx install poetry +``` + +To install the project dependencies via [poetry] run ```sh -python3 -m pip install poetry poetry install ``` -Afterwards the docs can be build with +## Manual Build + +After installing [poetry] and the project's dependencies, the docs can be build with ```sh poetry run make html ``` @@ -23,3 +33,21 @@ To open the generated HTML docs with Firefox you can run ```sh firefox _build/html/index.html ``` + +## Auto Rebuild + +Alternatively it is possible to start a local HTTP server that automatically +rebuilds the docs on every file change + +```sh +poetry run make livehtml +``` + +To open the served docs with Firefox you can run + +```sh +firefox http://127.0.0.1:8000 +``` + +[poetry]: https://python-poetry.org/ +[pipx]: https://pipx.pypa.io/stable/