Skip to content

Commit

Permalink
Update readthedocs configuration (#384)
Browse files Browse the repository at this point in the history
* Update readthedocs configuration

* Fix sphinx conf.py file

---------

Co-authored-by: Evan Goetz <[email protected]>
  • Loading branch information
eagoetz and Evan Goetz authored Nov 1, 2023
1 parent 821d1a2 commit c0a1ab4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
6 changes: 6 additions & 0 deletions .readthedocs.yml → .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.11"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py
Expand Down
16 changes: 3 additions & 13 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,22 +322,12 @@ def run_apidoc(_):

# -- add static files----------------------------------------------------------

def setup_static_content(app):
# configure stylesheets
for sdir in html_static_path:
# add stylesheets
cssdir = os.path.join(sdir, 'css')
for cssf in glob.glob(os.path.join(cssdir, '*.css')):
app.add_stylesheet(cssf.split(os.path.sep, 1)[1])

# add custom javascript
jsdir = os.path.join(sdir, 'js')
for jsf in glob.glob(os.path.join(jsdir, '*.js')):
app.add_javascript(jsf.split(os.path.sep, 1)[1])
html_css_files = [
'css/custom.css',
]


# -- setup --------------------------------------------------------------------

def setup(app):
setup_static_content(app)
app.connect('builder-inited', run_apidoc)

0 comments on commit c0a1ab4

Please sign in to comment.