mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-03 07:02:28 +03:00
Docs - default to sphinx_rtd_theme (#9237)
following examples and conf.py from sphinx_rtd_theme itself
This commit is contained in:
parent
587435110f
commit
cd844b99d9
41
doc/conf.py
41
doc/conf.py
@ -34,7 +34,9 @@ import sys
|
|||||||
extensions = [
|
extensions = [
|
||||||
'nbsphinx',
|
'nbsphinx',
|
||||||
'sphinx.ext.mathjax',
|
'sphinx.ext.mathjax',
|
||||||
|
'sphinx_rtd_theme',
|
||||||
]
|
]
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
templates_path = ['_templates']
|
templates_path = ['_templates']
|
||||||
|
|
||||||
@ -49,8 +51,9 @@ master_doc = 'index'
|
|||||||
|
|
||||||
# General information about the project.
|
# General information about the project.
|
||||||
project = u'ESP8266 Arduino Core'
|
project = u'ESP8266 Arduino Core'
|
||||||
copyright = u'2017, Ivan Grokhotkov'
|
slug = re.sub(r'\W+', '-', project.lower())
|
||||||
author = u'Ivan Grokhotkov'
|
author = u'Ivan Grokhotkov'
|
||||||
|
copyright = author
|
||||||
|
|
||||||
# The version info for the project you're documenting, acts as replacement for
|
# The version info for the project you're documenting, acts as replacement for
|
||||||
# |version| and |release|, also used in various other places throughout the
|
# |version| and |release|, also used in various other places throughout the
|
||||||
@ -71,7 +74,13 @@ language = 'en'
|
|||||||
# List of patterns, relative to source directory, that match files and
|
# List of patterns, relative to source directory, that match files and
|
||||||
# directories to ignore when looking for source files.
|
# directories to ignore when looking for source files.
|
||||||
# This patterns also effect to html_static_path and html_extra_path
|
# This patterns also effect to html_static_path and html_extra_path
|
||||||
exclude_patterns = ['_venv', '_build', 'Thumbs.db', '.DS_Store']
|
exclude_patterns = [
|
||||||
|
'_readthedocs',
|
||||||
|
'_venv',
|
||||||
|
'_build',
|
||||||
|
'Thumbs.db',
|
||||||
|
'.DS_Store',
|
||||||
|
]
|
||||||
|
|
||||||
# The name of the Pygments (syntax highlighting) style to use.
|
# The name of the Pygments (syntax highlighting) style to use.
|
||||||
pygments_style = 'sphinx'
|
pygments_style = 'sphinx'
|
||||||
@ -85,7 +94,7 @@ todo_include_todos = False
|
|||||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||||
# a list of builtin themes.
|
# a list of builtin themes.
|
||||||
#
|
#
|
||||||
html_theme = 'default'
|
html_theme = 'sphinx_rtd_theme'
|
||||||
|
|
||||||
# Theme options are theme-specific and customize the look and feel of a theme
|
# Theme options are theme-specific and customize the look and feel of a theme
|
||||||
# further. For a list of options available for each theme, see the
|
# further. For a list of options available for each theme, see the
|
||||||
@ -98,12 +107,12 @@ html_theme = 'default'
|
|||||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||||
html_static_path = ['_static']
|
html_static_path = ['_static']
|
||||||
|
|
||||||
|
|
||||||
# -- Options for HTMLHelp output ------------------------------------------
|
# -- Options for HTMLHelp output ------------------------------------------
|
||||||
|
|
||||||
# Output file base name for HTML help builder.
|
html_show_sourcelink = True
|
||||||
htmlhelp_basename = 'ESP8266ArduinoCoredoc'
|
|
||||||
|
|
||||||
|
# Output file base name for HTML help builder.
|
||||||
|
htmlhelp_basename = slug
|
||||||
|
|
||||||
# -- Options for LaTeX output ---------------------------------------------
|
# -- Options for LaTeX output ---------------------------------------------
|
||||||
|
|
||||||
@ -129,8 +138,7 @@ latex_elements = {
|
|||||||
# (source start file, target name, title,
|
# (source start file, target name, title,
|
||||||
# author, documentclass [howto, manual, or own class]).
|
# author, documentclass [howto, manual, or own class]).
|
||||||
latex_documents = [
|
latex_documents = [
|
||||||
(master_doc, 'ESP8266ArduinoCore.tex', u'ESP8266 Arduino Core Documentation',
|
(master_doc, f'{slug}.tex', f'{project} Documentation', author, 'manual'),
|
||||||
u'Ivan Grokhotkov', 'manual'),
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
@ -139,8 +147,7 @@ latex_documents = [
|
|||||||
# One entry per manual page. List of tuples
|
# One entry per manual page. List of tuples
|
||||||
# (source start file, name, description, authors, manual section).
|
# (source start file, name, description, authors, manual section).
|
||||||
man_pages = [
|
man_pages = [
|
||||||
(master_doc, 'esp8266arduinocore', u'ESP8266 Arduino Core Documentation',
|
(master_doc, slug, f'{project} Documentation', [author], 1)
|
||||||
[author], 1)
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
@ -150,19 +157,7 @@ man_pages = [
|
|||||||
# (source start file, target name, title, author,
|
# (source start file, target name, title, author,
|
||||||
# dir menu entry, description, category)
|
# dir menu entry, description, category)
|
||||||
texinfo_documents = [
|
texinfo_documents = [
|
||||||
(master_doc, 'ESP8266ArduinoCore', u'ESP8266 Arduino Core Documentation',
|
(master_doc, slug, f'{project} Documentation', author, slug, project, 'Miscellaneous'),
|
||||||
author, 'ESP8266ArduinoCore', 'One line description of project.',
|
|
||||||
'Miscellaneous'),
|
|
||||||
]
|
]
|
||||||
|
|
||||||
linkcheck_anchors_ignore = ["/#!"]
|
linkcheck_anchors_ignore = ["/#!"]
|
||||||
|
|
||||||
# -- Use sphinx_rtd_theme for local builds --------------------------------
|
|
||||||
# ref. https://github.com/snide/sphinx_rtd_theme#using-this-theme-locally-then-building-on-read-the-docs
|
|
||||||
#
|
|
||||||
# on_rtd is whether we are on readthedocs.org
|
|
||||||
env_readthedocs = os.environ.get('READTHEDOCS', None)
|
|
||||||
|
|
||||||
if not env_readthedocs: # only import and set the theme if we're building docs locally
|
|
||||||
import sphinx_rtd_theme
|
|
||||||
html_theme = 'sphinx_rtd_theme'
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user