Skip to content

Commit

Permalink
Update logo name
Browse files Browse the repository at this point in the history
  • Loading branch information
ashki23 committed Jul 30, 2022
1 parent bbedf6b commit 59e4666
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 2 deletions.
34 changes: 34 additions & 0 deletions docs/README.md
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.
8 changes: 8 additions & 0 deletions docs/_static/docs-generator.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
#!/bin/bash
# =============================================================================
# Author: Ashkan Mirzaee
# Organization: University of Missouri RCSS
# License: GPL-3.0
# Date: 2021/07/09
# Source: https://github.com/ashki23/sbox/docs
# =============================================================================

## Run the file from _static directory (cd _static)

## Create an env for Sphinx and Pandoc
#conda create -n sphinx -c conda-forge sphinx pandoc

source activate sphinx

## Build the local html for preview at ../_build/html/
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@

## For sphinx_rtd_theme
html_theme_options = {
'logo_only': True,
#'logo_only': True,
'navigation_depth': 3,
}
html_logo = "_static/logo.svg"
#html_logo = "_static/logo.svg"
html_show_sourcelink = True

## For alabaster theme
Expand Down

0 comments on commit 59e4666

Please sign in to comment.