mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2025-10-29 17:50:37 +00:00
Update docs config
Add epub output, fix PDF output to include page-numbers in links (for printed output), reduce the (now ridiculous) length of the ToC by dropping it to one level, add numbering to chapters
This commit is contained in:
1
Makefile
1
Makefile
@@ -80,6 +80,7 @@ install: $(SUBDIRS)
|
|||||||
doc: $(DOC_SOURCES)
|
doc: $(DOC_SOURCES)
|
||||||
$(MAKE) -C docs clean
|
$(MAKE) -C docs clean
|
||||||
$(MAKE) -C docs html
|
$(MAKE) -C docs html
|
||||||
|
$(MAKE) -C docs epub
|
||||||
$(MAKE) -C docs latexpdf
|
$(MAKE) -C docs latexpdf
|
||||||
|
|
||||||
source: $(DIST_TAR) $(DIST_ZIP)
|
source: $(DIST_TAR) $(DIST_ZIP)
|
||||||
|
|||||||
20
docs/conf.py
20
docs/conf.py
@@ -89,8 +89,8 @@ else:
|
|||||||
html_theme = 'default'
|
html_theme = 'default'
|
||||||
#html_theme_options = {}
|
#html_theme_options = {}
|
||||||
#html_sidebars = {}
|
#html_sidebars = {}
|
||||||
|
html_title = '%s %s Documentation' % (project, version)
|
||||||
#html_theme_path = []
|
#html_theme_path = []
|
||||||
#html_title = None
|
|
||||||
#html_short_title = None
|
#html_short_title = None
|
||||||
#html_logo = None
|
#html_logo = None
|
||||||
#html_favicon = None
|
#html_favicon = None
|
||||||
@@ -119,7 +119,7 @@ htmlhelp_basename = '%sdoc' % _setup.__project__
|
|||||||
latex_elements = {
|
latex_elements = {
|
||||||
'papersize': 'a4paper',
|
'papersize': 'a4paper',
|
||||||
'pointsize': '10pt',
|
'pointsize': '10pt',
|
||||||
#'preamble': '',
|
'preamble': r'\def\thempfootnote{\arabic{mpfootnote}}', # workaround sphinx issue #2530
|
||||||
}
|
}
|
||||||
|
|
||||||
latex_documents = [
|
latex_documents = [
|
||||||
@@ -129,16 +129,28 @@ latex_documents = [
|
|||||||
'%s Documentation' % project, # title
|
'%s Documentation' % project, # title
|
||||||
_setup.__author__, # author
|
_setup.__author__, # author
|
||||||
'manual', # documentclass
|
'manual', # documentclass
|
||||||
|
True, # documents ref'd from toctree only
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
||||||
#latex_logo = None
|
#latex_logo = None
|
||||||
#latex_use_parts = False
|
#latex_use_parts = False
|
||||||
#latex_show_pagerefs = False
|
latex_show_pagerefs = True
|
||||||
#latex_show_urls = False
|
latex_show_urls = 'footnote'
|
||||||
#latex_appendices = []
|
#latex_appendices = []
|
||||||
#latex_domain_indices = True
|
#latex_domain_indices = True
|
||||||
|
|
||||||
|
# -- Options for epub output ----------------------------------------------
|
||||||
|
|
||||||
|
epub_basename = _setup.__project__
|
||||||
|
#epub_theme = 'epub'
|
||||||
|
#epub_title = html_title
|
||||||
|
epub_author = _setup.__author__
|
||||||
|
epub_identifier = 'https://gpiozero.readthedocs.io/'
|
||||||
|
#epub_tocdepth = 3
|
||||||
|
epub_show_urls = 'no'
|
||||||
|
#epub_use_index = True
|
||||||
|
|
||||||
# -- Options for manual page output ---------------------------------------
|
# -- Options for manual page output ---------------------------------------
|
||||||
|
|
||||||
man_pages = []
|
man_pages = []
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ Table of Contents
|
|||||||
=================
|
=================
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 2
|
:maxdepth: 1
|
||||||
|
:numbered:
|
||||||
|
|
||||||
recipes
|
recipes
|
||||||
notes
|
notes
|
||||||
@@ -28,3 +29,11 @@ Table of Contents
|
|||||||
development
|
development
|
||||||
changelog
|
changelog
|
||||||
license
|
license
|
||||||
|
|
||||||
|
Indices and tables
|
||||||
|
==================
|
||||||
|
|
||||||
|
* :ref:`genindex`
|
||||||
|
* :ref:`modindex`
|
||||||
|
* :ref:`search`
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user