diff options
author | James Addison <55152140+jayaddison@users.noreply.github.com> | 2023-04-23 19:06:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-23 19:06:44 +0100 |
commit | 59de8d52029deca803d38b5d084a3a32c7b7f994 (patch) | |
tree | afd2646cf550155a10a8a9444697ad892f009e90 /sphinx/cmd/quickstart.py | |
parent | aee3c0ab75974790adf359a9c5089d1d781a6b21 (diff) | |
download | sphinx-git-59de8d52029deca803d38b5d084a3a32c7b7f994.tar.gz |
Revert "Support and prefer ``.jinja`` to ``_t`` for static templates (#11165)" (#11329)
This reverts commit 5d13215b58f93c6be8255ef2e3e20836508c7d47.
Diffstat (limited to 'sphinx/cmd/quickstart.py')
-rw-r--r-- | sphinx/cmd/quickstart.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sphinx/cmd/quickstart.py b/sphinx/cmd/quickstart.py index 580fa7d6d..6122ddd98 100644 --- a/sphinx/cmd/quickstart.py +++ b/sphinx/cmd/quickstart.py @@ -370,29 +370,29 @@ def generate( if 'quiet' not in d: print(__('File %s already exists, skipping.') % fpath) - conf_path = os.path.join(templatedir, 'conf.py.jinja') if templatedir else None + conf_path = os.path.join(templatedir, 'conf.py_t') if templatedir else None if not conf_path or not path.isfile(conf_path): - conf_path = os.path.join(package_dir, 'templates', 'quickstart', 'conf.py.jinja') + conf_path = os.path.join(package_dir, 'templates', 'quickstart', 'conf.py_t') with open(conf_path, encoding="utf-8") as f: conf_text = f.read() write_file(path.join(srcdir, 'conf.py'), template.render_string(conf_text, d)) masterfile = path.join(srcdir, d['master'] + d['suffix']) - if template._has_custom_template('quickstart/master_doc.rst.jinja'): + if template._has_custom_template('quickstart/master_doc.rst_t'): msg = ('A custom template `master_doc.rst_t` found. It has been renamed to ' '`root_doc.rst_t`. Please rename it on your project too.') print(colorize('red', msg)) - write_file(masterfile, template.render('quickstart/master_doc.rst.jinja', d)) + write_file(masterfile, template.render('quickstart/master_doc.rst_t', d)) else: - write_file(masterfile, template.render('quickstart/root_doc.rst.jinja', d)) + write_file(masterfile, template.render('quickstart/root_doc.rst_t', d)) if d.get('make_mode') is True: - makefile_template = 'quickstart/Makefile.new.jinja' - batchfile_template = 'quickstart/make.bat.new.jinja' + makefile_template = 'quickstart/Makefile.new_t' + batchfile_template = 'quickstart/make.bat.new_t' else: - makefile_template = 'quickstart/Makefile.jinja' - batchfile_template = 'quickstart/make.bat.jinja' + makefile_template = 'quickstart/Makefile_t' + batchfile_template = 'quickstart/make.bat_t' if d['makefile'] is True: d['rsrcdir'] = 'source' if d['sep'] else '.' |