|
| 1 | +# Configuration file for the Sphinx documentation builder. |
| 2 | +# |
| 3 | +# This file only contains a selection of the most common options. For a full |
| 4 | +# list see the documentation: |
| 5 | +# https://www.sphinx-doc.org/en/master/usage/configuration.html |
| 6 | + |
| 7 | +# -- Path setup -------------------------------------------------------------- |
| 8 | + |
| 9 | +import os |
| 10 | +import pkg_resources |
| 11 | + |
| 12 | +# -- Project information ----------------------------------------------------- |
| 13 | + |
| 14 | +project = "cxxheaderparser" |
| 15 | +copyright = "2020-2021, Dustin Spicuzza" |
| 16 | +author = "Dustin Spicuzza" |
| 17 | + |
| 18 | +# The full version, including alpha/beta/rc tags |
| 19 | +release = pkg_resources.get_distribution("cxxheaderparser").version |
| 20 | + |
| 21 | +# -- RTD configuration ------------------------------------------------ |
| 22 | + |
| 23 | +# on_rtd is whether we are on readthedocs.org, this line of code grabbed from docs.readthedocs.org |
| 24 | +on_rtd = os.environ.get("READTHEDOCS", None) == "True" |
| 25 | + |
| 26 | + |
| 27 | +# -- General configuration --------------------------------------------------- |
| 28 | + |
| 29 | +# Add any Sphinx extension module names here, as strings. They can be |
| 30 | +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
| 31 | +# ones. |
| 32 | +extensions = [ |
| 33 | + "sphinx.ext.autodoc", |
| 34 | + "sphinx_autodoc_typehints", |
| 35 | +] |
| 36 | + |
| 37 | +# Add any paths that contain templates here, relative to this directory. |
| 38 | +templates_path = ["_templates"] |
| 39 | + |
| 40 | +# List of patterns, relative to source directory, that match files and |
| 41 | +# directories to ignore when looking for source files. |
| 42 | +# This pattern also affects html_static_path and html_extra_path. |
| 43 | +exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] |
| 44 | + |
| 45 | + |
| 46 | +# -- Options for HTML output ------------------------------------------------- |
| 47 | + |
| 48 | +# The theme to use for HTML and HTML Help pages. See the documentation for |
| 49 | +# a list of builtin themes. |
| 50 | +# |
| 51 | +if not on_rtd: # only import and set the theme if we're building docs locally |
| 52 | + import sphinx_rtd_theme |
| 53 | + |
| 54 | + html_theme = "sphinx_rtd_theme" |
| 55 | + html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] |
| 56 | +else: |
| 57 | + html_theme = "default" |
| 58 | + |
| 59 | +# Add any paths that contain custom static files (such as style sheets) here, |
| 60 | +# relative to this directory. They are copied after the builtin static files, |
| 61 | +# so a file named "default.css" will overwrite the builtin "default.css". |
| 62 | +html_static_path = ["_static"] |
| 63 | + |
| 64 | +always_document_param_types = True |
0 commit comments