mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
quickstart: Simplify generated conf.py (EPUB)
This commit is contained in:
parent
319adefa9f
commit
d08903d9b9
@ -103,24 +103,6 @@ html_static_path = ['{{ dot }}static']
|
||||
# 'searchbox.html']``.
|
||||
#
|
||||
# html_sidebars = {}
|
||||
|
||||
|
||||
# -- Options for Epub output -------------------------------------------------
|
||||
|
||||
# Bibliographic Dublin Core info.
|
||||
epub_title = project
|
||||
|
||||
# The unique identifier of the text. This can be a ISBN number
|
||||
# or the project homepage.
|
||||
#
|
||||
# epub_identifier = ''
|
||||
|
||||
# A unique identification for the text.
|
||||
#
|
||||
# epub_uid = ''
|
||||
|
||||
# A list of files that should not be packed into the epub file.
|
||||
epub_exclude_files = ['search.html']
|
||||
{%- if extensions %}
|
||||
|
||||
|
||||
|
@ -70,7 +70,7 @@ def test_build_epub(app):
|
||||
|
||||
# toc.ncx
|
||||
toc = EPUBElementTree.fromstring((app.outdir / 'toc.ncx').text())
|
||||
assert toc.find("./ncx:docTitle/ncx:text").text == 'Python documentation'
|
||||
assert toc.find("./ncx:docTitle/ncx:text").text == 'Python'
|
||||
|
||||
# toc.ncx / head
|
||||
meta = list(toc.find("./ncx:head"))
|
||||
@ -94,7 +94,7 @@ def test_build_epub(app):
|
||||
# content.opf / metadata
|
||||
metadata = opf.find("./idpf:metadata")
|
||||
assert metadata.find("./dc:language").text == 'en'
|
||||
assert metadata.find("./dc:title").text == 'Python documentation'
|
||||
assert metadata.find("./dc:title").text == 'Python'
|
||||
assert metadata.find("./dc:description").text == 'unknown'
|
||||
assert metadata.find("./dc:creator").text == 'unknown'
|
||||
assert metadata.find("./dc:contributor").text == 'unknown'
|
||||
@ -174,7 +174,7 @@ def test_nested_toc(app):
|
||||
|
||||
# toc.ncx
|
||||
toc = EPUBElementTree.fromstring((app.outdir / 'toc.ncx').bytes())
|
||||
assert toc.find("./ncx:docTitle/ncx:text").text == 'Python documentation'
|
||||
assert toc.find("./ncx:docTitle/ncx:text").text == 'Python'
|
||||
|
||||
# toc.ncx / navPoint
|
||||
def navinfo(elem):
|
||||
@ -229,8 +229,7 @@ def test_escaped_toc(app):
|
||||
|
||||
# toc.ncx
|
||||
toc = EPUBElementTree.fromstring((app.outdir / 'toc.ncx').bytes())
|
||||
assert toc.find("./ncx:docTitle/ncx:text").text == ('need <b>"escaped"</b> '
|
||||
'project documentation')
|
||||
assert toc.find("./ncx:docTitle/ncx:text").text == 'need <b>"escaped"</b> project'
|
||||
|
||||
# toc.ncx / navPoint
|
||||
def navinfo(elem):
|
||||
|
Loading…
Reference in New Issue
Block a user