Skip to content

Commit

Permalink
fix underline, and button link, add more documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
mgoulao committed Feb 10, 2023
1 parent ade2e49 commit 257ad50
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 5 deletions.
54 changes: 51 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,40 @@

A [Farama Foundation](https://farama.org/) <a href="https://www.sphinx-doc.org/">Sphinx</a> documentation theme based on the [Furo template](https://github.com/pradyunsg/furo).

## Building Theme from source

## Build Documentation

To build and serve the documentation website you should go to the `docs/` directory and choose one of the following options.

**Option 1: Build once**

Build:
```
pip install nox
make dirhtml
OR
sphinx-build -b dirhtml . _build
```

Serve the generated website using python (you can choose other http servers):
```
nox -s docs-live
python -m http.server 8001 --directory _build
```

**Option 2: Automatically build when a change is made**

Install `sphinx-autobuild`

```
pip install sphinx-autobuild
```

Build and serve using:

```
sphinx-autobuild -b dirhtml . _build
```


## Google Analytics

To enable Google Analytics add the following theme option in the `conf.py` file.
Expand All @@ -22,6 +46,16 @@ html_theme_options = {
}
```

## Donations Banner/Button

To enable the donations banner and sidebar button, add the following theme option in the `conf.py` file.

``` python
html_theme_options = {
"donations": True,
}
```

## Versioning

Celshast supports documentation versioning using an HTML menu and GitHub Actions. Every page has a JS script that injects an html document with the [versions menu](https://github.com/Farama-Foundation/Celshast/blob/main/src/furo/theme/furo/static/versioning/versioning_menu.html), which allows updating older versions without rebuilding.
Expand Down Expand Up @@ -298,6 +332,20 @@ gen_tutorials.generate(
)
```

## Building Theme from source

To contribute to the theme you will need to build it. To do that install `nox` using `pip`.

```
pip install nox
```
And build the testing documentation using the following command.
```
nox -s docs-live
```
## License
Expand Down
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
"source_repository": "https://github.com/pradyunsg/furo/",
"source_branch": "main",
"source_directory": "docs/",
"donations": True
}

if "READTHEDOCS" in os.environ:
Expand Down
3 changes: 3 additions & 0 deletions src/furo/assets/styles/extensions/_farama.sass
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,9 @@ body
display: flex
align-items: center

a
text-decoration: none

button
margin-left: 22px
height: 36px
Expand Down
4 changes: 2 additions & 2 deletions src/furo/theme/furo/sidebar/donate.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% if theme_donations -%}
{% if theme_donations == True -%}
<div class="farama-sidebar-donate">
<a>
<a href="https://farama.org/donations" target="_blank" rel="noopener noreferrer">
<button class="farama-donate-btn">Donate</button>
</a>
</div>
Expand Down

0 comments on commit 257ad50

Please sign in to comment.