|
18 | 18 | # |
19 | 19 | import sys |
20 | 20 | import os |
21 | | -import shlex |
22 | | -# import os |
23 | | -# import sys |
| 21 | +import sphinx_rtd_theme |
24 | 22 |
|
25 | 23 | sys.path.insert(0, os.path.abspath('..')) |
26 | 24 | sys.path.insert(0, os.path.abspath('../../')) |
| 25 | +sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'extensions')) |
27 | 26 |
|
28 | 27 |
|
29 | 28 | # -- General configuration ------------------------------------------------ |
|
37 | 36 | # ones. |
38 | 37 | extensions = ['sphinx.ext.autodoc', |
39 | 38 | 'sphinx.ext.intersphinx', |
| 39 | + 'sphinx.ext.extlinks', |
40 | 40 | 'sphinx.ext.todo', |
41 | 41 | 'breathe', |
42 | | - 'sphinx.ext.ifconfig'] |
| 42 | + 'sphinx.ext.ifconfig', |
| 43 | + 'embarc.link-roles', |
| 44 | + 'embarc.html_redirects', |
| 45 | + 'sphinx_tabs.tabs'] |
43 | 46 |
|
44 | 47 | # Add any paths that contain templates here, relative to this directory. |
45 | 48 | templates_path = ['_templates'] |
|
50 | 53 |
|
51 | 54 | # The suffix(es) of source filenames. |
52 | 55 | # You can specify multiple suffix as a list of string: |
53 | | -# |
54 | | -# source_suffix = ['.rst', '.md'] |
| 56 | + |
55 | 57 | source_suffix = ['.rst', '.md'] |
56 | 58 |
|
57 | 59 | # The master toctree document. |
|
87 | 89 | # The name of the Pygments (syntax highlighting) style to use. |
88 | 90 | pygments_style = 'sphinx' |
89 | 91 |
|
| 92 | +# Additional lexer for Pygments (syntax highlighting) |
| 93 | +from lexer.DtsLexer import DtsLexer |
| 94 | +from sphinx.highlighting import lexers |
| 95 | +lexers['DTS'] = DtsLexer() |
| 96 | + |
90 | 97 | # If true, `todo` and `todoList` produce output, else they produce nothing. |
91 | | -todo_include_todos = True |
| 98 | +todo_include_todos = False |
92 | 99 |
|
93 | 100 |
|
94 | 101 | # -- Options for HTML output ---------------------------------------------- |
|
97 | 104 | # a list of builtin themes. |
98 | 105 | # |
99 | 106 | html_theme = 'sphinx_rtd_theme' |
100 | | - |
| 107 | +html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] |
| 108 | +html_theme_options = { |
| 109 | + 'prev_next_buttons_location': None |
| 110 | +} |
| 111 | +if tags.has('release'): # pylint: disable=undefined-variable |
| 112 | + is_release = True |
| 113 | + docs_title = 'Docs / %s' %(version) |
| 114 | +else: |
| 115 | + is_release = False |
| 116 | + docs_title = 'Docs / Latest' |
| 117 | + |
| 118 | +# The name for this set of Sphinx documents. If None, it defaults to |
| 119 | +# "<project> v<release> documentation". |
| 120 | +html_title = "embARC OSP Project Documentation" |
101 | 121 | # Theme options are theme-specific and customize the look and feel of a theme |
102 | 122 | # further. For a list of options available for each theme, see the |
103 | 123 | # documentation. |
|
109 | 129 | # so a file named "default.css" will overwrite the builtin "default.css". |
110 | 130 | html_static_path = ['_static'] |
111 | 131 |
|
| 132 | +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, |
| 133 | +# using the given strftime format. |
| 134 | +html_last_updated_fmt = '%b %d, %Y' |
| 135 | + |
| 136 | +# If false, no module index is generated. |
| 137 | +html_domain_indices = False |
| 138 | + |
| 139 | +# If false, no index is generated. |
| 140 | +html_use_index = True |
| 141 | + |
| 142 | +# If true, the index is split into individual pages for each letter. |
| 143 | +html_split_index = True |
| 144 | + |
| 145 | +# If true, links to the reST sources are added to the pages. |
| 146 | +html_show_sourcelink = False |
| 147 | + |
| 148 | +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. |
| 149 | +html_show_sphinx = False |
| 150 | + |
| 151 | +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. |
| 152 | +# html_show_copyright = tags.has('development') |
| 153 | + |
| 154 | +# If true, license is shown in the HTML footer. Default is True. |
| 155 | +html_show_license = True |
| 156 | + |
112 | 157 |
|
113 | 158 | html_context = { |
114 | 159 | 'css_files': [ |
|
136 | 181 | # Additional stuff for the LaTeX preamble. |
137 | 182 | # |
138 | 183 | # 'preamble': '', |
139 | | - |
| 184 | + 'preamble': r'\setcounter{tocdepth}{2}', |
140 | 185 | # Latex figure (float) alignment |
141 | 186 | # |
142 | 187 | # 'figure_align': 'htbp', |
|
0 commit comments