2 changed files with 51 additions and 1 deletions
@ -0,0 +1,48 @@
|
||||
# Installation de Sphinx (debian 11) |
||||
|
||||
Installer le paquet d'environnement virtuel python, ainsi que pip (ce qui installera aussi python si nécessaire) |
||||
|
||||
``` shell |
||||
sudo apt update |
||||
sudo apt install python3-venv python3-pip |
||||
``` |
||||
|
||||
Nous supposons pour la suite que le projet de documentation est structuré ainsi : |
||||
|
||||
``` |
||||
projet-de-documentation |
||||
├─ dist |
||||
│ ├─ html |
||||
│ └─ pdf |
||||
├─ outils |
||||
└─ source |
||||
``` |
||||
|
||||
Créer une environnement virtuel python. Cela permet d'installer des modules python qui ne seront utilisés que par ce projet (et donc d'avoir d'autres modules, ou d'autres versions des mêmes modules, dans d'autres projets). |
||||
|
||||
``` shell |
||||
cd projet-de-documentation |
||||
python3 -m venv outils |
||||
``` |
||||
|
||||
Activer l'environnement python (à refaire chaque fois que vous relancez un terminal pour exécuter des commandes python sur ce projet) |
||||
|
||||
``` shell |
||||
cd projet-de-documentation |
||||
source outils/bin/activate |
||||
``` |
||||
|
||||
Installer [Sphinx](https://www.sphinx-doc.org/en/master/index.html) |
||||
|
||||
``` shell |
||||
pip install -U pip setuptools wheel |
||||
pip install Sphinx myst-parser sphinx_rtd_theme linkify-it-py |
||||
``` |
||||
|
||||
# Générer la documentation au format HTML |
||||
|
||||
``` shell |
||||
cd projet-de-documentation |
||||
source outils/bin/activate |
||||
sphinx-build -b html source dist/html |
||||
``` |
@ -1 +1,3 @@
|
||||
Welcome to the Wiki. |
||||
Utilisation de Sphinx |
||||
|
||||
* [Compiler la documentation](Compiler-la-documentation) |
||||
|
Loading…
Reference in new issue