|
4 | 4 | # https://www.sphinx-doc.org/en/master/usage/configuration.html |
5 | 5 |
|
6 | 6 | # -- Project information ----------------------------------------------------- |
7 | | -# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information |
8 | | - |
9 | | -project = 'learning-python' |
10 | | -copyright = '2025, v.skolan' |
11 | | -author = 'v.skolan' |
12 | | - |
13 | | -# -- General configuration --------------------------------------------------- |
14 | | -# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration |
15 | | - |
16 | | -import recommonmark |
17 | | -from recommonmark.transform import AutoStructify |
18 | | - |
19 | | -extensions = [ |
20 | | - 'recommonmark', |
21 | | -] |
22 | | -# Configuration file for the Sphinx documentation builder. |
23 | | -# |
24 | | -# For the full list of built-in configuration values, see the documentation: |
25 | | -# https://www.sphinx-doc.org/en/master/usage/configuration.html |
26 | | - |
27 | | -# -- Project information ----------------------------------------------------- |
28 | | -# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information |
29 | | - |
30 | 7 | project = 'learning-python' |
31 | 8 | copyright = '2025, v.skolan' |
32 | 9 | author = 'v.skolan' |
33 | 10 |
|
34 | 11 | # -- General configuration --------------------------------------------------- |
35 | | -# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration |
36 | | - |
37 | | -extensions = [ |
38 | | - 'recommonmark', |
39 | | -] |
40 | | -html_theme = 'sphinx_rtd_theme' |
41 | | -html_theme_path = ["_themes"] |
42 | | -# Configuration file for the Sphinx documentation builder. |
43 | | -# |
44 | | -# For the full list of built-in configuration values, see the documentation: |
45 | | -# https://www.sphinx-doc.org/en/master/usage/configuration.html |
46 | | - |
47 | | -# -- Project information ----------------------------------------------------- |
48 | | -# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information |
49 | | - |
50 | | -project = 'learning-python' |
51 | | -copyright = '2025, v.skolan' |
52 | | -author = 'v.skolan' |
| 12 | +import sys |
| 13 | +import os |
53 | 14 |
|
54 | | -# -- General configuration --------------------------------------------------- |
55 | | -# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration |
| 15 | +# Add path to extensions |
| 16 | +sys.path.append(os.path.abspath('.')) |
56 | 17 |
|
57 | 18 | extensions = [ |
58 | 19 | 'recommonmark', |
59 | 20 | 'sphinx_rtd_theme', |
60 | 21 | ] |
61 | | -html_theme = 'sphinx_rtd_theme' |
62 | | -html_theme_path = ["_themes"] |
63 | | -# Configuration file for the Sphinx documentation builder. |
64 | | -# |
65 | | -# For the full list of built-in configuration values, see the documentation: |
66 | | -# https://www.sphinx-doc.org/en/master/usage/configuration.html |
67 | 22 |
|
68 | | -# -- Project information ----------------------------------------------------- |
69 | | -# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information |
| 23 | +# Add source file types |
| 24 | +source_suffix = { |
| 25 | + '.rst': 'restructuredtext', |
| 26 | + '.md': 'markdown', |
| 27 | +} |
70 | 28 |
|
71 | | -project = 'learning-python' |
72 | | -copyright = '2025, v.skolan' |
73 | | -author = 'v.skolan' |
74 | | - |
75 | | -# -- General configuration --------------------------------------------------- |
76 | | -# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration |
77 | | - |
78 | | -extensions = [ |
79 | | - 'recommonmark', |
80 | | - 'sphinx_rtd_theme', |
81 | | -] |
82 | | -html_theme = 'sphinx_rtd_theme' |
83 | | -html_theme_path = ["_themes"] |
84 | | -source_suffix = ['.rst', '.md'] |
85 | | -# Configuration file for the Sphinx documentation builder. |
86 | | -# |
87 | | -# For the full list of built-in configuration values, see the documentation: |
88 | | -# https://www.sphinx-doc.org/en/master/usage/configuration.html |
| 29 | +# The master toctree document |
| 30 | +master_doc = 'index' |
89 | 31 |
|
90 | | -# -- Project information ----------------------------------------------------- |
91 | | -# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information |
92 | | - |
93 | | -project = 'learning-python' |
94 | | -copyright = '2025, v.skolan' |
95 | | -author = 'v.skolan' |
| 32 | +templates_path = ['_templates'] |
| 33 | +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] |
96 | 34 |
|
97 | | -# -- General configuration --------------------------------------------------- |
98 | | -# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration |
| 35 | +# Language settings |
| 36 | +language = 'de' |
99 | 37 |
|
100 | | -extensions = [ |
101 | | - 'recommonmark', |
102 | | - 'sphinx_rtd_theme', |
103 | | -] |
| 38 | +# -- Options for HTML output ------------------------------------------------- |
104 | 39 | html_theme = 'sphinx_rtd_theme' |
105 | | -html_theme_path = ["_themes"] |
106 | | -source_suffix = ['.rst', '.md'] |
| 40 | +html_static_path = ['_static'] |
107 | 41 |
|
| 42 | +# -- Extension configuration ------------------------------------------------- |
108 | 43 | def setup(app): |
| 44 | + from recommonmark.transform import AutoStructify |
109 | 45 | app.add_config_value('recommonmark_config', { |
110 | 46 | 'enable_eval_rst': True, |
111 | | - 'auto_toc_tree_depth': 2, |
| 47 | + 'auto_toc_tree_section': 'Contents', |
| 48 | + 'enable_math': True, |
| 49 | + 'enable_inline_math': True, |
| 50 | + 'enable_auto_doc_ref': True, |
112 | 51 | }, True) |
113 | 52 | app.add_transform(AutoStructify) |
114 | | - |
115 | | -templates_path = ['_templates'] |
116 | | -exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] |
117 | | - |
118 | | -language = 'de' |
119 | | - |
120 | | -# -- Options for HTML output ------------------------------------------------- |
121 | | -# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output |
122 | | - |
123 | | -html_theme = 'alabaster' |
124 | | -html_static_path = ['_static'] |
0 commit comments