Skip to content

Commit 5dd76e9

Browse files
committed
Reduce the overrides and re-use as much as possible
1 parent 6ad97e8 commit 5dd76e9

File tree

1 file changed

+4
-71
lines changed

1 file changed

+4
-71
lines changed

conf.py

Lines changed: 4 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -18,92 +18,25 @@
1818
sys.path.append(os.path.abspath('cpython/Doc/tools/extensions'))
1919
sys.path.append(os.path.abspath('cpython/Doc/includes'))
2020

21-
# General configuration
22-
# ---------------------
23-
24-
extensions = ['sphinx.ext.coverage', 'sphinx.ext.doctest',
25-
'pyspecific', 'c_annotations', 'escape4chm']
21+
# Import all the Sphinx settings from cpython
22+
sys.path.append(os.path.abspath('cpython/Doc'))
23+
from conf import *
2624

25+
release = version = '3.7.7'
2726

2827
project = 'Python en Español'
2928
copyright = '2001-%s, Python Software Foundation' % time.strftime('%Y')
3029

31-
release = version = '3.7.7'
32-
33-
# There are two options for replacing |today|: either, you set today to some
34-
# non-false value, then it is used:
35-
today = ''
36-
# Else, today_fmt is used as the format for a strftime call.
37-
today_fmt = '%B %d, %Y'
38-
39-
# By default, highlight as Python 3.
40-
highlight_language = 'python3'
41-
42-
# Minimum version of sphinx required
43-
needs_sphinx = '1.8'
44-
45-
# Ignore any .rst files in the venv/ directory.
46-
exclude_patterns = ['venv/*', 'README.rst']
47-
48-
# Avoid a warning with Sphinx >= 2.0
49-
master_doc = 'contents'
50-
51-
# Use our custom theme.
52-
html_theme = 'python_docs_theme'
5330
html_theme_path = ['cpython/Doc/tools']
54-
html_theme_options = {
55-
'collapsiblesidebar': True,
56-
'issues_url': 'https://docs.python.org/3/bugs.html',
57-
'root_include_title': False # We use the version switcher instead.
58-
}
59-
60-
# Short title used e.g. for <title> HTML tags.
61-
html_short_title = '%s Documentation' % release
62-
63-
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
64-
# using the given strftime format.
65-
html_last_updated_fmt = '%b %d, %Y'
66-
67-
# Path to find HTML templates.
6831
templates_path = ['cpython/Doc/tools/templates']
69-
70-
# Custom sidebar templates, filenames relative to this file.
71-
html_sidebars = {
72-
# Defaults taken from http://www.sphinx-doc.org/en/stable/config.html#confval-html_sidebars
73-
# Removes the quick search block
74-
'**': ['localtoc.html', 'relations.html', 'customsourcelink.html'],
75-
'index': ['indexsidebar.html'],
76-
}
77-
78-
# Additional templates that should be rendered to pages.
79-
html_additional_pages = {
80-
'download': 'download.html',
81-
'index': 'indexcontent.html',
82-
}
83-
84-
# Output an OpenSearch description file.
85-
html_use_opensearch = 'https://docs.python.org/' + version
86-
87-
# Additional static files.
8832
html_static_path = ['cpython/Doc/tools/static']
8933

90-
# Output file base name for HTML help builder.
91-
htmlhelp_basename = 'python' + release.replace('.', '')
92-
93-
# Split the index
94-
html_split_index = True
95-
96-
# Relative filename of the reference count data file.
97-
refcount_file = 'data/refcounts.dat'
98-
99-
10034
os.system('mkdir -p cpython/locales/es/')
10135
os.system('ln -nfs `pwd` cpython/locales/es/LC_MESSAGES')
10236

10337
gettext_compact = False
10438
locale_dirs = ['../locales', 'cpython/locales'] # relative to the sourcedir
10539

106-
10740
def setup(app):
10841
# Change the sourcedir programmatically because Read the Docs always call it with `.`
10942
app.srcdir = 'cpython/Doc'

0 commit comments

Comments
 (0)