diff --git a/docs/documentation.rst b/docs/documentation.rst new file mode 100644 index 0000000000000000000000000000000000000000..d1e182fd0f7f286a73146214b57505d1e361f32c --- /dev/null +++ b/docs/documentation.rst @@ -0,0 +1,37 @@ +Documentation +============= + +La documentation est gérée grâce à Sphinx. Le thème est le thème officiel de +ReadTheDocs ``sphinx-rtd-theme``. + +Générer localement la documentation +----------------------------------- + +On commence par se rendre au bon endroit et installer les bonnes dépendances : + +.. code:: bash + + cd docs + pip install -r requirements.txt + +La documentation se génère à partir d'appels à ``make``, selon le type de +documentation voulue. + +Par exemple, ``make dirhtml`` construit la documentation web, +``make latexpdf`` construit un livre PDF avec cette documentation. + + +Documentation automatique +------------------------- + +Ansible compile et déploie automatiquement la documentation du projet, dans +le rôle ``8-docs``. Le rôle installe dans le bon environnement les dépendances +nécessaires, puis appelle sphinx pour placer la documentation compilée dans +``/var/www/documentation`` : + +.. code:: bash + + /var/www/note_kfet/env/bin/sphinx-build -b dirhtml /var/www/note_kfet/docs/ /var/www/documentation/ + +Ce dossier est exposé par ``nginx`` sur le chemin +`/doc <https://note.crans.org/doc>`_. diff --git a/docs/index.rst b/docs/index.rst index ac17e171847904a75b87fb503a27dc88815f9380..d80ad515a4bc6aa6d1e9252b5cfc95935515df33 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -12,4 +12,5 @@ Des informations complémentaires sont également disponibles sur le `Wiki Crans :caption: Développement de la NK20 apps/index + documentation external_services/index