Skip to content

Commit

Permalink
Updated read the docs config.
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanFabian committed May 10, 2024
1 parent b316f4f commit 65c9812
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 8 deletions.
16 changes: 16 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2
build:
os: ubuntu-22.04
tools:
python: "3.12"
apt_packages:
- graphviz
# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py
formats:
- pdf
- epub
python:
install:
- requirements: docs/requirements.txt
15 changes: 7 additions & 8 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,14 @@
# import sys
# sys.path.insert(0, os.path.abspath('.'))

on_rtd = os.environ.get('READTHEDOCS', None) == 'True'

# Fix for Q_Property
from breathe.renderer.sphinxrenderer import DomainDirectiveFactory, CMacroObject
if "property" not in DomainDirectiveFactory.cpp_classes:
DomainDirectiveFactory.cpp_classes["property"] = (CMacroObject, "macro")

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

# On ReadTheDocs, generate the Doxygen documentation
if os.environ.get('READTHEDOCS', None) == 'True':
from subprocess import call
call('doxygen')

Expand All @@ -45,9 +41,12 @@
extensions = [
"breathe",
"sphinx.ext.autosectionlabel",
"sphinx.ext.todo"
"sphinx.ext.todo",
"sphinx_rtd_theme"
]

html_theme = 'sphinx_rtd_theme'

todo_include_todos = True

# Breathe Configuration
Expand Down
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
breathe
sphinx_rtd_theme

0 comments on commit 65c9812

Please sign in to comment.