Skip to content

Commit

Permalink
Merge pull request #1228 from jluebbe/rtd-theme
Browse files Browse the repository at this point in the history
docs/conf.py: make opengraph optional and use sphinx_rtd_theme for local builds as well
  • Loading branch information
jluebbe committed Aug 17, 2023
2 parents 194a8dc + b30539f commit 52dfd8e
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 5 deletions.
13 changes: 9 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,16 @@
'sphinx.ext.autodoc',
'sphinx.ext.coverage',
'sphinx.ext.ifconfig',
'sphinxext.opengraph',
'sphinx_rtd_theme',
]

ogp_site_url = 'https://rauc.readthedocs.io/en/latest/'
ogp_image = 'https://rauc.readthedocs.io/en/latest/_static/RAUC_Logo_outline.svg'
try:
import sphinxext.opengraph
extensions.append('sphinxext.opengraph')
ogp_site_url = 'https://rauc.readthedocs.io/en/latest/'
ogp_image = 'https://rauc.readthedocs.io/en/latest/_static/RAUC_Logo_outline.svg'
except ModuleNotFoundError:
print("not using sphinxext.opengraph")

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand Down Expand Up @@ -72,7 +77,7 @@

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'default'
html_theme = 'sphinx_rtd_theme'

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
Expand Down
4 changes: 4 additions & 0 deletions docs/requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# use pip-compile requirements.in to update requirements.txt
sphinx
sphinx-rtd-theme
sphinxext-opengraph
90 changes: 89 additions & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,89 @@
sphinxext-opengraph
#
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile requirements.in
#
alabaster==0.7.13
# via sphinx
babel==2.12.1
# via sphinx
certifi==2023.7.22
# via requests
charset-normalizer==3.2.0
# via requests
contourpy==1.1.0
# via matplotlib
cycler==0.11.0
# via matplotlib
docutils==0.18.1
# via
# sphinx
# sphinx-rtd-theme
fonttools==4.42.0
# via matplotlib
idna==3.4
# via requests
imagesize==1.4.1
# via sphinx
jinja2==3.1.2
# via sphinx
kiwisolver==1.4.4
# via matplotlib
markupsafe==2.1.3
# via jinja2
matplotlib==3.7.2
# via sphinxext-opengraph
numpy==1.25.2
# via
# contourpy
# matplotlib
packaging==23.1
# via
# matplotlib
# sphinx
pillow==10.0.0
# via matplotlib
pygments==2.16.1
# via sphinx
pyparsing==3.0.9
# via matplotlib
python-dateutil==2.8.2
# via matplotlib
requests==2.31.0
# via sphinx
six==1.16.0
# via python-dateutil
snowballstemmer==2.2.0
# via sphinx
sphinx==6.2.1
# via
# -r requirements.in
# sphinx-rtd-theme
# sphinxcontrib-applehelp
# sphinxcontrib-devhelp
# sphinxcontrib-htmlhelp
# sphinxcontrib-jquery
# sphinxcontrib-qthelp
# sphinxcontrib-serializinghtml
# sphinxext-opengraph
sphinx-rtd-theme==1.2.2
# via -r requirements.in
sphinxcontrib-applehelp==1.0.7
# via sphinx
sphinxcontrib-devhelp==1.0.5
# via sphinx
sphinxcontrib-htmlhelp==2.0.4
# via sphinx
sphinxcontrib-jquery==4.1
# via sphinx-rtd-theme
sphinxcontrib-jsmath==1.0.1
# via sphinx
sphinxcontrib-qthelp==1.0.6
# via sphinx
sphinxcontrib-serializinghtml==1.1.8
# via sphinx
sphinxext-opengraph==0.8.2
# via -r requirements.in
urllib3==2.0.4
# via requests

0 comments on commit 52dfd8e

Please sign in to comment.