|
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 -------------------------------------------------------------- |
| 1 | +import sys, re |
| 2 | +from os.path import abspath |
| 3 | +from pathlib import Path |
| 4 | +from json import dump, loads |
8 | 5 |
|
9 | 6 | # If extensions (or modules to document with autodoc) are in another directory,
|
10 | 7 | # add these directories to sys.path here. If the directory is relative to the
|
11 | 8 | # documentation root, use os.path.abspath to make it absolute, like shown here.
|
12 | 9 | import os
|
13 | 10 | import sys
|
14 |
| -sys.path.insert(0, os.path.abspath('.')) |
15 |
| -sys.path.insert(0, os.path.abspath('..')) |
16 |
| -sys.path.insert(0, os.path.abspath('../pyVHDLModel')) |
17 |
| -#sys.path.insert(0, os.path.abspath('_extensions')) |
18 |
| -#sys.path.insert(0, os.path.abspath('_themes/sphinx_rtd_theme')) |
| 11 | +sys.path.insert(0, abspath('.')) |
| 12 | +sys.path.insert(0, abspath('..')) |
| 13 | +sys.path.insert(0, abspath('../pyVHDLModel')) |
| 14 | +#sys.path.insert(0, abspath('_extensions')) |
19 | 15 |
|
20 | 16 |
|
21 | 17 | # ==============================================================================
|
@@ -93,14 +89,27 @@ def _LatestTagName():
|
93 | 89 | # ==============================================================================
|
94 | 90 | # Options for HTML output
|
95 | 91 | # ==============================================================================
|
96 |
| -# html_theme = 'alabaster' |
97 |
| -html_theme = 'sphinx_rtd_theme' |
| 92 | +html_theme_options = { |
| 93 | + 'home_breadcrumbs': True, |
| 94 | + 'vcs_pageview_mode': 'blob', |
| 95 | +} |
| 96 | + |
| 97 | +html_context = {} |
| 98 | +ctx = Path(__file__).resolve().parent / 'context.json' |
| 99 | +if ctx.is_file(): |
| 100 | + html_context.update(loads(ctx.open('r').read())) |
| 101 | + |
| 102 | +html_theme_path = ["."] |
| 103 | +html_theme = "_theme" |
98 | 104 |
|
99 | 105 | # Add any paths that contain custom static files (such as style sheets) here,
|
100 | 106 | # relative to this directory. They are copied after the builtin static files,
|
101 | 107 | # so a file named "default.css" will overwrite the builtin "default.css".
|
102 | 108 | html_static_path = ['_static']
|
103 | 109 |
|
| 110 | +# Output file base name for HTML help builder. |
| 111 | +htmlhelp_basename = 'pyVHDLModelDoc' |
| 112 | + |
104 | 113 | # If not None, a 'Last updated on:' timestamp is inserted at every page
|
105 | 114 | # bottom, using the given strftime format.
|
106 | 115 | # The empty string is equivalent to '%b %d, %Y'.
|
@@ -159,9 +168,6 @@ def _LatestTagName():
|
159 | 168 | # Extensions
|
160 | 169 | # ==============================================================================
|
161 | 170 | extensions = [
|
162 |
| -# Sphinx theme |
163 |
| - "sphinx_rtd_theme", |
164 |
| - |
165 | 171 | # Standard Sphinx extensions
|
166 | 172 | "sphinx.ext.autodoc",
|
167 | 173 | 'sphinx.ext.extlinks',
|
|
0 commit comments