|
34 | 34 | extensions = [
|
35 | 35 | 'nbsphinx',
|
36 | 36 | 'sphinx.ext.mathjax',
|
| 37 | + 'sphinx_rtd_theme', |
37 | 38 | ]
|
| 39 | + |
38 | 40 | # Add any paths that contain templates here, relative to this directory.
|
39 | 41 | templates_path = ['_templates']
|
40 | 42 |
|
|
49 | 51 |
|
50 | 52 | # General information about the project.
|
51 | 53 | project = u'ESP8266 Arduino Core'
|
52 |
| -copyright = u'2017, Ivan Grokhotkov' |
| 54 | +slug = re.sub(r'\W+', '-', project.lower()) |
53 | 55 | author = u'Ivan Grokhotkov'
|
| 56 | +copyright = author |
54 | 57 |
|
55 | 58 | # The version info for the project you're documenting, acts as replacement for
|
56 | 59 | # |version| and |release|, also used in various other places throughout the
|
|
71 | 74 | # List of patterns, relative to source directory, that match files and
|
72 | 75 | # directories to ignore when looking for source files.
|
73 | 76 | # This patterns also effect to html_static_path and html_extra_path
|
74 |
| -exclude_patterns = ['_venv', '_build', 'Thumbs.db', '.DS_Store'] |
| 77 | +exclude_patterns = [ |
| 78 | + '_readthedocs', |
| 79 | + '_venv', |
| 80 | + '_build', |
| 81 | + 'Thumbs.db', |
| 82 | + '.DS_Store', |
| 83 | +] |
75 | 84 |
|
76 | 85 | # The name of the Pygments (syntax highlighting) style to use.
|
77 | 86 | pygments_style = 'sphinx'
|
|
85 | 94 | # The theme to use for HTML and HTML Help pages. See the documentation for
|
86 | 95 | # a list of builtin themes.
|
87 | 96 | #
|
88 |
| -html_theme = 'default' |
| 97 | +html_theme = 'sphinx_rtd_theme' |
89 | 98 |
|
90 | 99 | # Theme options are theme-specific and customize the look and feel of a theme
|
91 | 100 | # further. For a list of options available for each theme, see the
|
|
98 | 107 | # so a file named "default.css" will overwrite the builtin "default.css".
|
99 | 108 | html_static_path = ['_static']
|
100 | 109 |
|
101 |
| - |
102 | 110 | # -- Options for HTMLHelp output ------------------------------------------
|
103 | 111 |
|
104 |
| -# Output file base name for HTML help builder. |
105 |
| -htmlhelp_basename = 'ESP8266ArduinoCoredoc' |
| 112 | +html_show_sourcelink = True |
106 | 113 |
|
| 114 | +# Output file base name for HTML help builder. |
| 115 | +htmlhelp_basename = slug |
107 | 116 |
|
108 | 117 | # -- Options for LaTeX output ---------------------------------------------
|
109 | 118 |
|
|
129 | 138 | # (source start file, target name, title,
|
130 | 139 | # author, documentclass [howto, manual, or own class]).
|
131 | 140 | latex_documents = [
|
132 |
| - (master_doc, 'ESP8266ArduinoCore.tex', u'ESP8266 Arduino Core Documentation', |
133 |
| - u'Ivan Grokhotkov', 'manual'), |
| 141 | + (master_doc, f'{slug}.tex', f'{project} Documentation', author, 'manual'), |
134 | 142 | ]
|
135 | 143 |
|
136 | 144 |
|
|
139 | 147 | # One entry per manual page. List of tuples
|
140 | 148 | # (source start file, name, description, authors, manual section).
|
141 | 149 | man_pages = [
|
142 |
| - (master_doc, 'esp8266arduinocore', u'ESP8266 Arduino Core Documentation', |
143 |
| - [author], 1) |
| 150 | + (master_doc, slug, f'{project} Documentation', [author], 1) |
144 | 151 | ]
|
145 | 152 |
|
146 | 153 |
|
|
150 | 157 | # (source start file, target name, title, author,
|
151 | 158 | # dir menu entry, description, category)
|
152 | 159 | texinfo_documents = [
|
153 |
| - (master_doc, 'ESP8266ArduinoCore', u'ESP8266 Arduino Core Documentation', |
154 |
| - author, 'ESP8266ArduinoCore', 'One line description of project.', |
155 |
| - 'Miscellaneous'), |
| 160 | + (master_doc, slug, f'{project} Documentation', author, slug, project, 'Miscellaneous'), |
156 | 161 | ]
|
157 | 162 |
|
158 | 163 | linkcheck_anchors_ignore = ["/#!"]
|
159 |
| - |
160 |
| -# -- Use sphinx_rtd_theme for local builds -------------------------------- |
161 |
| -# ref. https://github.com/snide/sphinx_rtd_theme#using-this-theme-locally-then-building-on-read-the-docs |
162 |
| -# |
163 |
| -# on_rtd is whether we are on readthedocs.org |
164 |
| -env_readthedocs = os.environ.get('READTHEDOCS', None) |
165 |
| - |
166 |
| -if not env_readthedocs: # only import and set the theme if we're building docs locally |
167 |
| - import sphinx_rtd_theme |
168 |
| - html_theme = 'sphinx_rtd_theme' |
0 commit comments