-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
44 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Creating Readthedocs page | ||
|
||
- Create a conda env including `sphinx` and `pandoc`: | ||
|
||
```bash | ||
conda create -n sphinx -c conda-forge sphinx pandoc | ||
conda activate sphinx | ||
``` | ||
|
||
- For the first time, we need to create a `conf.py`, `index.rst` and `Makefile`. Sphinx comes with a script called `sphinx-quickstart` that sets up a source directory and creates a default conf.py with the most useful configuration values from a few questions it asks you. To use this, run: | ||
|
||
```bash | ||
sphinx-quickstart | ||
``` | ||
|
||
- Now we can update `index.rst` and add other pages in `rst`. Also, we can add any HTML template layouts to `_templates`, or any images or pdf files to `_statics` directory. | ||
- Note that, in this project we just need to update the `index.rst` file and other `rst` files will be generated from the main `../README.md` by running `docs-generator.sh` script. | ||
|
||
- Run the `docs-generator.sh` to create `rst` files: | ||
|
||
```bash | ||
cd _static | ||
source docs-generator.sh | ||
``` | ||
|
||
The `docs-generator.sh` also will generate the man files automatically in `../share/man/man1/`. | ||
|
||
- To build the HTML files run: | ||
|
||
```bash | ||
make html | ||
``` | ||
|
||
The html pages will be available under `_build/html` path. Note that for readthedoc project we do not need the HTML file, therefore its better add the `_build` directory to the `.gitignore` file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters