|
5 | 5 | #
|
6 | 6 | # This file is execfile()d with the current directory set to its containing dir.
|
7 | 7 |
|
8 |
| -# All configuration values have a default; values that are commented out |
9 |
| -# serve to show the default. |
10 |
| - |
11 | 8 | import sys
|
12 | 9 | import os
|
13 | 10 | import datetime
|
|
16 | 13 |
|
17 | 14 | import mongodb_docs_meta
|
18 | 15 |
|
19 |
| -meta = { 'branch': mongodb_docs_meta.get_branch(), |
20 |
| - 'commit': mongodb_docs_meta.get_commit(), |
21 |
| - 'manual_path': mongodb_docs_meta.get_manual_path(), |
22 |
| - 'date': str(datetime.date.today().year), |
| 16 | +meta = { |
| 17 | + 'branch': mongodb_docs_meta.get_branch(), |
| 18 | + 'commit': mongodb_docs_meta.get_commit(), |
| 19 | + 'manual_path': mongodb_docs_meta.get_manual_path(), |
| 20 | + 'date': str(datetime.date.today().year), |
23 | 21 | }
|
24 | 22 |
|
25 | 23 | # -- General configuration ----------------------------------------------------
|
26 | 24 |
|
27 | 25 | needs_sphinx = '1.0'
|
28 | 26 |
|
29 |
| -# Add any Sphinx extension module names here, as strings. They can be extensions |
30 |
| -# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. |
31 |
| -extensions = ["sphinx.ext.intersphinx", "sphinx.ext.extlinks", "sphinx.ext.todo", "mongodb_domain", "additional_directives", "aggregation_domain"] |
| 27 | +extensions = [ |
| 28 | + 'sphinx.ext.intersphinx', |
| 29 | + 'sphinx.ext.extlinks', |
| 30 | + 'sphinx.ext.todo', |
| 31 | + 'mongodb_domain', |
| 32 | + 'additional_directives', |
| 33 | + 'aggregation_domain', |
| 34 | +] |
32 | 35 |
|
33 |
| -# Add any paths that contain templates here, relative to this directory. |
34 | 36 | templates_path = ['.templates']
|
| 37 | +exclude_patterns = [] |
35 | 38 |
|
36 |
| -# The suffix of source filenames. |
37 | 39 | source_suffix = '.txt'
|
38 | 40 |
|
39 |
| -# The encoding of source files. |
40 |
| -#source_encoding = 'utf-8-sig' |
41 |
| - |
42 |
| -# The master toctree document. |
43 | 41 | master_doc = 'contents'
|
44 |
| - |
45 |
| -# General information about the project. |
46 | 42 | project = u'MongoDB'
|
47 | 43 | copyright = u'2011-' + meta['date'] + ', 10gen, Inc.'
|
48 |
| - |
49 |
| -# The version info for the project you're documenting, acts as replacement for |
50 |
| -# |version| and |release|, also used in various other places throughout the |
51 |
| -# built documents. The value of ``version`` is used in the paths for the curl commands. |
52 |
| - |
53 | 44 | version = '2.2.2'
|
54 | 45 | release = version
|
55 | 46 |
|
|
59 | 50 | '.. |year| replace:: ' + meta['date'] + BREAK +
|
60 | 51 | '.. |hardlink| replace:: http://docs.mongodb.org/' + meta['branch'])
|
61 | 52 |
|
62 |
| -# The language for content autogenerated by Sphinx. Refer to documentation |
63 |
| -# for a list of supported languages. |
64 |
| -#language = None |
65 |
| - |
66 |
| -# There are two options for replacing |today|: either, you set today to some |
67 |
| -# non-false value, then it is used: |
68 |
| -#today = '' |
69 |
| -# Else, today_fmt is used as the format for a strftime call. |
70 |
| -#today_fmt = '%B %d, %Y' |
71 |
| - |
72 |
| -# List of patterns, relative to source directory, that match files and |
73 |
| -# directories to ignore when looking for source files. |
74 |
| -exclude_patterns = [] |
75 |
| - |
76 |
| -# The reST default role (used for this markup: `text`) to use for all documents. |
77 |
| -#default_role = None |
78 |
| - |
79 |
| -# If true, '()' will be appended to :func: etc. cross-reference text. |
80 |
| -#add_function_parentheses = True |
81 |
| - |
82 |
| -# If true, the current module name will be prepended to all description |
83 |
| -# unit titles (such as .. function::). |
84 |
| -#add_module_names = True |
85 |
| - |
86 |
| -# If true, sectionauthor and moduleauthor directives will be shown in the |
87 |
| -# output. They are ignored by default. |
88 |
| -#show_authors = False |
89 |
| - |
90 |
| -# The name of the Pygments (syntax highlighting) style to use. |
91 | 53 | pygments_style = 'sphinx'
|
92 | 54 |
|
93 |
| -# A list of ignored prefixes for module index sorting. |
94 |
| -#modindex_common_prefix = [] |
95 |
| - |
96 | 55 | extlinks = {
|
97 | 56 | 'issue': ('https://jira.mongodb.org/browse/%s', '' ),
|
98 | 57 | 'wiki': ('http://www.mongodb.org/display/DOCS/%s', ''),
|
99 | 58 | 'api': ('http://api.mongodb.org/%s', ''),
|
100 | 59 | 'source': ('https://github.com/mongodb/mongo/blob/master/%s', ''),
|
101 | 60 | 'docsgithub' : ( 'http://github.com/mongodb/docs/blob/' + meta['branch'] + '/%s', ''),
|
102 | 61 | 'hardlink' : ( 'http://docs.mongodb.org/' + meta['branch'] + '/%s', '')
|
103 |
| - } |
| 62 | +} |
104 | 63 |
|
105 | 64 | intersphinx_mapping = {
|
106 | 65 | 'pymongo': ('http://api.mongodb.org/python/current/', None),
|
107 | 66 | 'python' : ('http://docs.python.org/', None),
|
108 | 67 | 'django': ('https://django.readthedocs.org/en/latest/', None),
|
109 | 68 | 'djangomongodbengine': ('http://django-mongodb.org/', None),
|
110 | 69 | 'djangotoolbox' : ('http://djangotoolbox.readthedocs.org/en/latest/', None),
|
111 |
| - } |
| 70 | +} |
112 | 71 |
|
113 | 72 | # -- Options for HTML output ---------------------------------------------------
|
114 | 73 |
|
115 |
| -# The theme to use for HTML and HTML Help pages. See the documentation for |
116 |
| -# a list of builtin themes... |
117 | 74 | html_theme = 'mongodb'
|
118 |
| - |
119 |
| -# Add any paths that contain custom themes here, relative to this directory. |
120 | 75 | html_theme_path = ['themes']
|
121 |
| - |
122 |
| -# The name for this set of Sphinx documents. If None, it defaults to |
123 |
| -# "<project> v<release> documentation". |
124 | 76 | html_title = project + ' Manual'
|
| 77 | +htmlhelp_basename = 'MongoDBdoc' |
125 | 78 |
|
126 |
| -# A shorter title for the navigation bar. Default is the same as html_title. |
127 |
| -#html_short_title = None |
128 |
| - |
129 |
| -# The name of an image file (relative to this directory) to place at the top |
130 |
| -# of the sidebar. |
131 | 79 | html_logo = ".static/logo-mongodb.png"
|
132 |
| - |
133 |
| -# The name of an image file (within the static path) to use as favicon of the |
134 |
| -# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 |
135 |
| -# pixels large. |
136 |
| -#html_favicon = None |
137 |
| - |
138 |
| -# Add any paths that contain custom static files (such as style sheets) here, |
139 |
| -# relative to this directory. They are copied after the builtin static files, |
140 |
| -# so a file named "default.css" will overwrite the builtin "default.css". |
141 | 80 | html_static_path = ['source/.static']
|
142 | 81 |
|
143 |
| -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, |
144 |
| -# using the given strftime format. |
145 |
| -html_last_updated_fmt = '%b %d, %Y' |
146 |
| - |
147 | 82 | html_copy_source = False
|
148 | 83 | html_use_smartypants = True
|
149 | 84 | html_domain_indices = True
|
|
155 | 90 |
|
156 | 91 | manual_edition_path = 'http://docs.mongodb.org/' + meta['branch'] + '/' + project + '-Manual-' + meta['branch']
|
157 | 92 |
|
158 |
| -html_theme_options = { 'branch': meta['branch'], |
159 |
| - 'pdfpath': manual_edition_path + '.pdf', |
160 |
| - 'epubpath': manual_edition_path + '.epub', |
161 |
| - 'manual_path': meta['manual_path'], |
162 |
| - 'repo_name': 'docs', |
163 |
| - 'jira_project': 'DOCS', |
164 |
| - 'google_analytics': 'UA-7301842-8', |
165 |
| - 'is_manual': True, |
166 |
| - 'project': 'manual', |
167 |
| - } |
168 |
| - |
169 |
| -# If true, an OpenSearch description file will be output, and all pages will |
170 |
| -# contain a <link> tag referring to it. The value of this option must be the |
171 |
| -# base URL from which the finished HTML is served. |
172 |
| -#html_use_opensearch = '' |
173 |
| - |
174 |
| -# This is the file name suffix for HTML files (e.g. ".xhtml"). |
175 |
| -#html_file_suffix = None |
176 |
| - |
177 |
| -# Output file base name for HTML help builder. |
178 |
| -htmlhelp_basename = 'MongoDBdoc' |
| 93 | +html_theme_options = { |
| 94 | + 'branch': meta['branch'], |
| 95 | + 'pdfpath': manual_edition_path + '.pdf', |
| 96 | + 'epubpath': manual_edition_path + '.epub', |
| 97 | + 'manual_path': meta['manual_path'], |
| 98 | + 'repo_name': 'docs', |
| 99 | + 'jira_project': 'DOCS', |
| 100 | + 'google_analytics': 'UA-7301842-8', |
| 101 | + 'is_manual': True, |
| 102 | + 'project': 'manual', |
| 103 | +} |
| 104 | + |
| 105 | +html_sidebars = { |
| 106 | + '**': ['localtoc.html', 'pagenav.html', 'wikisidebar.html'], |
| 107 | +} |
179 | 108 |
|
180 | 109 | # -- Options for LaTeX output --------------------------------------------------
|
181 | 110 |
|
|
187 | 116 | ('crud', 'MongoDB-crud.tex', u'MongoDB CRUD Operations Introduction', u'MongoDB Documentation Project', 'manual'),
|
188 | 117 | ]
|
189 | 118 |
|
190 |
| -latex_elements = { 'preamble': '\DeclareUnicodeCharacter{FF04}{\$} \DeclareUnicodeCharacter{FF0E}{.}', |
191 |
| - 'pointsize': '10pt', |
192 |
| - 'papersize': 'letterpaper' |
193 |
| - } |
| 119 | +latex_elements = { |
| 120 | + 'preamble': '\DeclareUnicodeCharacter{FF04}{\$} \DeclareUnicodeCharacter{FF0E}{.}', |
| 121 | + 'pointsize': '10pt', |
| 122 | + 'papersize': 'letterpaper' |
| 123 | +} |
194 | 124 |
|
195 | 125 | latex_use_parts = True
|
196 | 126 | latex_show_pagerefs = True
|
197 | 127 | latex_show_urls = False
|
198 | 128 | latex_domain_indices = True
|
199 |
| - |
200 |
| -# The name of an image file (relative to this directory) to place at the top of the title page. |
201 |
| -#latex_logo = None |
202 |
| - |
203 |
| -# Documents to append as an appendix to all manuals. |
204 |
| -#latex_appendices = [] |
| 129 | +latex_logo = None |
| 130 | +latex_appendices = [] |
205 | 131 |
|
206 | 132 | # -- Options for manual page output --------------------------------------------
|
207 | 133 |
|
|
244 | 170 | epub_identifier = 'http://docs.mongodb.org/' + meta['branch']
|
245 | 171 | epub_exclude_files = []
|
246 | 172 |
|
247 |
| -# HTML files that should be inserted before/after the pages created by sphinx. |
248 |
| -# The format is a list of tuples containing the path and title. |
249 |
| -#epub_pre_files = [] |
250 |
| -#epub_post_files = [] |
| 173 | +epub_pre_files = [] |
| 174 | +epub_post_files = [] |
0 commit comments