catch2/docs/conf.py

53 lines
935 B
Python
Raw Normal View History

2023-06-27 11:16:09 +02:00
import os
import subprocess
from sphinx.application import Sphinx
from pathlib import Path
2023-06-27 09:38:20 +02:00
project = 'Catch2'
copyright = '2023, Martin Hořeňovský'
author = 'Martin Hořeňovský'
extensions = [
"myst_parser",
"sphinx_design",
"sphinx_togglebutton",
"breathe",
]
templates_path = []
exclude_patterns = [
'build',
'_build',
'Thumbs.db',
'.DS_Store',
"Readme.md",
]
source_suffix = [".md"]
html_theme = 'furo'
2023-06-27 11:16:09 +02:00
# html_static_path = ['_static']
2023-06-27 09:38:20 +02:00
myst_enable_extensions = [
"tasklist",
"colon_fence",
]
2023-06-27 11:16:09 +02:00
breathe_projects = {
"Catch2": "build/doxygen/xml",
}
breathe_default_project = "Catch2"
def generate_doxygen_xml(app: Sphinx):
"""
Run the doxygen commands
"""
os.chdir(Path(app.confdir).parent)
subprocess.run(["doxygen"])
def setup(app: Sphinx):
# Add hook for building doxygen xml when needed
app.connect("builder-inited", generate_doxygen_xml)