mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
quickstart: Simplify generated conf.py (source_suffix)
This commit is contained in:
parent
d129f447c3
commit
d4df28c643
@ -56,12 +56,14 @@ extensions = [
|
|||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
templates_path = ['{{ dot }}templates']
|
templates_path = ['{{ dot }}templates']
|
||||||
|
|
||||||
|
{% if suffix != '.rst' -%}
|
||||||
# The suffix(es) of source filenames.
|
# The suffix(es) of source filenames.
|
||||||
# You can specify multiple suffix as a list of string:
|
# You can specify multiple suffix as a list of string:
|
||||||
#
|
#
|
||||||
# source_suffix = ['.rst', '.md']
|
# source_suffix = ['.rst', '.md']
|
||||||
source_suffix = {{ suffix | repr }}
|
source_suffix = {{ suffix | repr }}
|
||||||
|
|
||||||
|
{% endif -%}
|
||||||
{% if master_doc != 'index' -%}
|
{% if master_doc != 'index' -%}
|
||||||
# The master toctree document.
|
# The master toctree document.
|
||||||
master_doc = {{ master | repr }}
|
master_doc = {{ master | repr }}
|
||||||
|
@ -112,7 +112,6 @@ def test_quickstart_defaults(tempdir):
|
|||||||
execfile_(conffile, ns)
|
execfile_(conffile, ns)
|
||||||
assert ns['extensions'] == []
|
assert ns['extensions'] == []
|
||||||
assert ns['templates_path'] == ['_templates']
|
assert ns['templates_path'] == ['_templates']
|
||||||
assert ns['source_suffix'] == '.rst'
|
|
||||||
assert ns['master_doc'] == 'index'
|
assert ns['master_doc'] == 'index'
|
||||||
assert ns['project'] == 'Sphinx Test'
|
assert ns['project'] == 'Sphinx Test'
|
||||||
assert ns['copyright'] == '%s, Georg Brandl' % time.strftime('%Y')
|
assert ns['copyright'] == '%s, Georg Brandl' % time.strftime('%Y')
|
||||||
|
Loading…
Reference in New Issue
Block a user