Skip to content

Commit

Permalink
Add ReadTheDocs config file
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
pierky committed Oct 22, 2023
1 parent 06282f8 commit 56cb91f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 10 deletions.
23 changes: 23 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.11"

formats:
- epub

sphinx:
configuration: docs/conf.py

python:
install:
- requirements: requirements.txt
- requirements: requirements-dev.txt
- requirements: requirements-docs.txt
12 changes: 2 additions & 10 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = "en"

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand All @@ -82,15 +82,7 @@

# -- Options for HTML output ----------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
on_rtd = os.environ.get("READTHEDOCS", None) == "True"

if not on_rtd:
import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
html_theme = 'sphinx_rtd_theme'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand Down

0 comments on commit 56cb91f

Please sign in to comment.