... | @@ -19,7 +19,7 @@ will create the directory docs/ |
... | @@ -19,7 +19,7 @@ will create the directory docs/ |
|
|
|
|
|
# Adapt the default configuration
|
|
# Adapt the default configuration
|
|
|
|
|
|
Need to modify 2 files : conf.py and index.rst
|
|
Need to modify 2 files : conf.py and index.rst (see templates below)
|
|
|
|
|
|
# Finalise the documentation structure
|
|
# Finalise the documentation structure
|
|
|
|
|
... | @@ -38,9 +38,26 @@ make clean |
... | @@ -38,9 +38,26 @@ make clean |
|
make html
|
|
make html
|
|
```
|
|
```
|
|
|
|
|
|
# Cnfiguration files
|
|
# Configuration files
|
|
|
|
|
|
Editer le conf.py, ici un exemple
|
|
Editer le conf.py. There are only 3 modifications to be done
|
|
|
|
|
|
|
|
1. Specify the path to the python files
|
|
|
|
```java
|
|
|
|
import os
|
|
|
|
import sys
|
|
|
|
sys.path.insert(0, os.path.abspath('../../foo/'))
|
|
|
|
```
|
|
|
|
|
|
|
|
2. Add some extensions (needed)
|
|
|
|
```java
|
|
|
|
extensions = ['sphinx.ext.todo', 'sphinx.ext.viewcode', 'sphinx.ext.autodoc']
|
|
|
|
```
|
|
|
|
|
|
|
|
3. Choose a nice theme
|
|
|
|
```java
|
|
|
|
html_theme = 'sphinx_rtd_theme'
|
|
|
|
```
|
|
|
|
|
|
```java
|
|
```java
|
|
# Configuration file for the Sphinx documentation builder.
|
|
# Configuration file for the Sphinx documentation builder.
|
... | @@ -99,6 +116,11 @@ html_static_path = ['_static'] |
... | @@ -99,6 +116,11 @@ html_static_path = ['_static'] |
|
|
|
|
|
Editer index.rst, ici un exemple
|
|
Editer index.rst, ici un exemple
|
|
|
|
|
|
|
|
1. Add "modules"
|
|
|
|
```java
|
|
|
|
modules
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
```java
|
|
```java
|
|
.. P documentation master file, created by
|
|
.. P documentation master file, created by
|
... | | ... | |