|
4 | 4 | # list see the documentation:
|
5 | 5 | # https://www.sphinx-doc.org/en/master/usage/configuration.html
|
6 | 6 |
|
| 7 | + |
| 8 | +import os |
7 | 9 | import pathlib
|
8 | 10 | import re
|
9 | 11 | import sys
|
|
14 | 16 | # If extensions (or modules to document with autodoc) are in another directory,
|
15 | 17 | # add these directories to sys.path here. If the directory is relative to the
|
16 | 18 | # documentation root, use os.path.abspath to make it absolute, like shown here.
|
17 |
| -# |
18 |
| -# import os |
19 |
| -# import sys |
20 |
| -# sys.path.insert(0, os.path.abspath('.')) |
21 | 19 |
|
22 | 20 | pathobj_docs_dir = pathlib.Path(__file__).parent.absolute()
|
23 | 21 | pathobj_rootdir = pathobj_docs_dir.parent.absolute()
|
|
42 | 40 | # ones.
|
43 | 41 | extensions = [
|
44 | 42 | "breathe",
|
45 |
| - "myst_parser", |
46 |
| - "rst2pdf.pdfbuilder", |
47 |
| - "sphinx_rtd_theme", |
| 43 | + "recommonmark", |
| 44 | + "sphinx_copybutton", |
| 45 | + "sphinx_jinja", |
| 46 | + "sphinx.ext.autosectionlabel", |
| 47 | + "sphinx.ext.graphviz", |
| 48 | + "sphinxcontrib.kroki", |
| 49 | + "sphinxcontrib.programoutput", |
48 | 50 | "sphinxcontrib.spelling",
|
49 | 51 | ]
|
50 | 52 |
|
51 | 53 | needs_sphinx = "1.8"
|
52 | 54 |
|
53 | 55 | # Add any paths that contain templates here, relative to this directory.
|
54 |
| -templates_path = ["_templates"] |
| 56 | +templates_path = ["../../_templates"] |
55 | 57 |
|
56 | 58 | # List of patterns, relative to source directory, that match files and
|
57 | 59 | # directories to ignore when looking for source files.
|
|
65 | 67 | '.md': 'markdown',
|
66 | 68 | }
|
67 | 69 |
|
| 70 | +breathe_projects = {project: "../build/doc/xml/"} |
| 71 | +breathe_default_project = project |
68 | 72 |
|
69 |
| -# -- Options for HTML output ------------------------------------------------- |
70 | 73 |
|
71 |
| -# The theme to use for HTML and HTML Help pages. See the documentation for |
72 |
| -# a list of builtin themes. |
73 |
| -# |
74 |
| -html_theme = "sphinx_rtd_theme" |
| 74 | +# -- Options for HTML output ------------------------------------------------- |
75 | 75 |
|
76 |
| -# Add any paths that contain custom static files (such as style sheets) here, |
77 |
| -# relative to this directory. They are copied after the builtin static files, |
78 |
| -# so a file named "default.css" will overwrite the builtin "default.css". |
79 |
| -html_static_path = ["static"] |
| 76 | +html_context = { |
| 77 | + "default_mode": "light" |
| 78 | +} |
80 | 79 |
|
| 80 | +html_theme = "sphinx_book_theme" |
81 | 81 | html_theme_options = {
|
82 | 82 | "show_nav_level": 3,
|
83 | 83 | "home_page_in_toc": True,
|
|
89 | 89 | }
|
90 | 90 |
|
91 | 91 | html_last_updated_fmt = "%Y-%m-%d %H:%M"
|
92 |
| -breathe_projects = {project: "../build/doc/xml/"} |
93 |
| -breathe_default_project = project |
94 |
| - |
95 |
| -html_css_files = [ |
96 |
| - "../../css/custom_rtd.css", # Requested by web developer |
97 |
| - "css/fix_table_width.css", |
98 |
| - "css/change_header_size.css", |
99 |
| -] |
| 92 | +html_static_path = ["static"] |
| 93 | +html_logo = "static/i/p-net.svg" |
| 94 | +html_show_sourcelink = False |
| 95 | + |
| 96 | +if os.getenv("USE_EXTERNAL_CSS") is not None: |
| 97 | + html_css_files = [ |
| 98 | + "https://rt-labs.com/content/themes/rtlabs2020/assets/css/style.css", |
| 99 | + "https://rt-labs.com/content/themes/rtlabs2020/assets/css/rt_custom_sphinx.css", |
| 100 | + ] |
100 | 101 |
|
101 | 102 |
|
102 | 103 | # -- Options for PDF output -------------------------------------------------
|
|
0 commit comments