代码拉取完成,页面将自动刷新
# -*- coding: utf-8 -*-
#
# MongoDB documentation build configuration file, created by
# sphinx-quickstart on Mon Oct 3 09:58:40 2011.
#
# This file is execfile()d with the current directory set to its containing dir.
import sys
import os
import datetime
from sphinx.errors import SphinxError
from giza.config.runtime import RuntimeStateConfig
from giza.config.helper import fetch_config, get_versions, get_manual_path
conf = fetch_config(RuntimeStateConfig())
sconf = conf.system.files.data.sphinx_local
sys.path.append(os.path.join(conf.paths.projectroot, conf.paths.buildsystem, 'sphinxext'))
try:
tags
except NameError:
class Tags(object):
def has(self, *args):
return False
tags = Tags()
# -- General configuration ----------------------------------------------------
needs_sphinx = '1.0'
extensions = [
'sphinx.ext.extlinks',
'sphinx.ext.todo',
'mongodb',
'directives',
'intermanual',
]
locale_dirs = [ os.path.join(conf.paths.projectroot, conf.paths.locale) ]
gettext_compact = False
templates_path = ['.templates']
exclude_patterns = []
source_suffix = '.txt'
master_doc = sconf.master_doc
language = 'en'
project = sconf.project
copyright = u'2008-{0}'.format(datetime.date.today().year)
version = conf.version.branch
release = conf.version.release
rst_epilog = '\n'.join([
'.. |copy| unicode:: U+000A9',
'.. |ent-build| replace:: MongoDB Enterprise',
'.. |year| replace:: {0}'.format(datetime.date.today().year),
'.. |hardlink| replace:: {0}/{1}'.format(conf.project.url, conf.git.branches.current),
'.. |branch| replace:: ``{0}``'.format(conf.git.branches.current),
])
pygments_style = 'sphinx'
extlinks = {
'issue': ('https://jira.mongodb.org/browse/%s', '' ),
'api': ('http://api.mongodb.com/%s', ''),
'manual': ('http://docs.mongodb.com/manual%s', ''),
'ecosystem': ('http://docs.mongodb.com/ecosystem%s', ''),
### We could use the already defined :api: but if we need to specify a particular driver,
### we could just change here
'csharp-api': ('http://api.mongodb.com/csharp/current/html%s.htm', ''),
}
## add `extlinks` for each published version.
for i in conf.git.branches.published:
extlinks[i] = ( ''.join([ conf.project.url, '/', i, '%s' ]), '' )
intersphinx_mapping = {}
for i in conf.system.files.data.intersphinx:
intersphinx_mapping[i.name] = ( i.url, os.path.join(conf.paths.projectroot,
conf.paths.output,
i.path))
# -- Options for HTML output ---------------------------------------------------
html_theme = sconf.theme.name
html_theme_path = [ os.path.join(conf.paths.buildsystem, 'themes') ]
html_title = conf.project.title
htmlhelp_basename = 'MongoDBdoc'
html_logo = sconf.logo
html_static_path = sconf.paths.static
html_copy_source = False
html_domain_indices = True
html_use_index = True
html_split_index = False
html_show_sourcelink = False
html_show_sphinx = True
html_show_copyright = True
manual_edition_path = '{0}/{1}/{2}'.format(conf.project.url,
conf.git.branches.current,
sconf.theme.book_path_base)
html_theme_options = {
'branch': conf.git.branches.current,
'manual_path': get_manual_path(conf),
'language': language,
'repo_name': sconf.theme.repo,
'jira_project': sconf.theme.jira,
'google_analytics': sconf.theme.google_analytics,
'project': sconf.theme.project,
'version': version,
'version_selector': [{'text':'Shell','path':'getting-started/shell'},
{'text':'Python','path':'getting-started/python'},
{'text':'C#','path':'getting-started/csharp'}],
# 'version_selector': get_versions(conf),
'stable': conf.version.stable,
'sitename': sconf.theme.sitename,
'nav_excluded': sconf.theme.nav_excluded,
}
html_sidebars = sconf.sidebars
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。