Skip to content

Commit 1eee3ae

Browse files
committed
Initial
0 parents  commit 1eee3ae

21 files changed

+1889
-0
lines changed

.gitignore

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
build/*
2+
*.swp
3+
.#*
4+
\#*#
5+
*__pycache__*
6+
*.pyc
7+
*.pyo
8+
*.bak
9+
.DS_Store
10+
source/includes/hash.rst
11+
source/includes/install-*-release-*.rst
12+
source/includes/table-*.rst
13+
source/includes/toc-*.rst
14+
source/includes/dfn*.rst
15+
source/includes/manpage-options-auth-mongo.rst
16+
source/includes/manpage-options-ssl-settings.rst
17+
source/includes/manpage-options-audit-settings.rst
18+
TAGS
19+
mongodb-domain.yaml
20+
composite-pages.yaml
21+
!bin/*/mongodb-domain.yaml
22+
meta.yaml
23+
build
24+
*~
25+
source/reference/*/*.rst
26+
source/reference/*/*/*.rst
27+
source/reference/*.rst
28+
source/compass/images/*
29+
source/images/compass/
30+
giza.log
31+
pdfs.yaml
32+
intersphinx.yaml
33+
!bin/*/pdfs.yaml
34+
source/includes/hash.rst
35+
docs_meta.yaml
36+
!bin/docs_meta.yaml
37+
fabfile
38+
source/includes/toc/
39+
source/includes/table/
40+
source/includes/steps/
41+
source/includes/generated/includes-overview.rst
42+
source/includes/generated/
43+
source/includes/option/
44+
source/includes/changelogs/*.rst
45+
!source/includes/changelogs/releases/*.rst
46+
primer/source/includes/toc/
47+
primer/source/includes/table/
48+
primer/source/includes/steps/
49+
primer/source/includes/generated/includes-overview.rst
50+
primer/source/includes/generated/
51+
primer/source/includes/option/
52+
primer/source/includes/hash.rst
53+
primer/source/.static
54+
primer/source/*.rst
55+
primer/source/core/*.rst
56+
primer/source/includes/example*.txt
57+
primer/source/includes/example-*.rst
58+
primer/source/includes/driver-table.rst
59+
primer/source/includes/fact-installation-bind-ip-default-in-config.rst
60+
primer/source/includes/fact-installation-directories.rst
61+
primer/source/includes/fact-selinux-redhat-options.rst
62+
primer/source/includes/list-mongodb-org-packages.rst
63+
primer/source/includes/note-package-change.rst
64+
primer/source/includes/note-suse-ulimit.rst
65+
primer/source/tutorial/*.rst
66+
primer/source/includes/toc-*yaml
67+
primer/source/includes/steps-*yaml
68+
!primer/source/includes/steps-client-*.yaml
69+
!primer/source/includes/steps-getting-started-prereq.yaml
70+
primer/source/includes/release-*yaml
71+
primer/source/tutorial/install-mongodb-on-*.txt
72+
!primer/config/intersphinx.yaml
73+
!primer/config/published_branches.yaml
74+
!primer/source/includes/toc-primer-*yaml
75+
!primer/source/includes/steps-primer*yaml
76+
!primer/source/includes/client-*rst
77+
!primer/source/includes/prereq-*.rst
78+
primer/source/images/*.png
79+
primer/source/images/*.rst
80+
primer/source/images/*.svg
81+
primer/source/includes/*.cpp
82+
primer/source/includes/*.java
83+
primer/source/includes/*.cs
84+
*.mo
85+
.stub
86+
primer/source/includes/table-linux-kernel-version-production.yaml
87+
venv

Makefile

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
GIT_BRANCH=`git rev-parse --abbrev-ref HEAD`
2+
USER=`whoami`
3+
STAGING_URL="https://docs-mongodborg-staging.corp.mongodb.com"
4+
PRODUCTION_URL="https://docs.mongodb.org/meta"
5+
STAGING_BUCKET=docs-mongodb-org-staging
6+
PRODUCTION_BUCKET=docs-mongodb-org-prod
7+
8+
# "PROJECT" currently exists to support having multiple projects
9+
# within one bucket. For the manual it is empty.
10+
PROJECT=meta
11+
12+
.PHONY: help lint html stage deploy
13+
14+
help: ## Show this help message
15+
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
16+
@echo
17+
@echo 'Variables'
18+
@printf " \033[36m%-18s\033[0m %s\n" 'ARGS' 'Arguments to pass to mut-publish'
19+
20+
html: ## Builds this branch's HTML under build/<branch>/html
21+
giza make html
22+
23+
publish: ## Builds this branch's publishable HTML and other artifacts under build/public
24+
giza make publish
25+
26+
# - Enter build/<branch>/html, and recurse over each regular file
27+
# <basename>/<filename>.
28+
# * Upload each to the S3 bucket under <project>/<username>/<basename>/<filename>
29+
stage: ## Host online for review
30+
mut-publish build/${GIT_BRANCH}/html ${STAGING_BUCKET} --prefix=${PROJECT} --stage ${ARGS}
31+
@echo "Hosted at ${STAGING_URL}/${USER}/${GIT_BRANCH}/index.html"
32+
33+
# - Enter build/public/<branch>, as well as any symbolic links pointing
34+
# to it, and recurse over each file <basename>/<filename>.
35+
# * Upload each to the S3 bucket under <project>/<basename>/<filename>.
36+
# - Upload each *regular file* <filename> underneath build/public
37+
# underneath <project>/<filename>.
38+
# - Download the redirect rules from S3 that begin with one of the
39+
# --redirect-prefix regex rules.
40+
# - Parse the file build/public/.htaccess, and for each redirect rule:
41+
# * If rule does not exist in remote set, upload redirect.
42+
# - Remove previously-matched redirect rules in S3 that do not exist in
43+
# local redirect set.
44+
45+
# The recursive behavior would CHANGE if --all-subdirectories were
46+
# given: ALL contents of build/public/<branch> would be upload
47+
deploy: build/public ## Deploy to the production bucket
48+
@echo "Doing a dry-run"
49+
mut-publish build/public ${PRODUCTION_BUCKET} --prefix=${PROJECT} --deploy --all-subdirectories --verbose --dry-run ${ARGS}
50+
51+
@echo 'Press any key to perform the previous' && read result
52+
mut-publish build/public ${PRODUCTION_BUCKET} --prefix=${PROJECT} --deploy --all-subdirectories ${ARGS}
53+
54+
@echo "Hosted at ${PRODUCTION_URL}/index.html"

conf.py

Lines changed: 217 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,217 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# MongoDB documentation build configuration file, created by
4+
# sphinx-quickstart on Mon Oct 3 09:58:40 2011.
5+
#
6+
# This file is execfile()d with the current directory set to its containing dir.
7+
8+
import sys
9+
import os
10+
import datetime
11+
12+
from sphinx.errors import SphinxError
13+
14+
from giza.config.runtime import RuntimeStateConfig
15+
from giza.config.helper import fetch_config, get_manual_path
16+
17+
conf = fetch_config(RuntimeStateConfig())
18+
sconf = conf.system.files.data.sphinx_local
19+
20+
sys.path.append(os.path.join(conf.paths.projectroot, conf.paths.buildsystem, 'sphinxext'))
21+
22+
try:
23+
tags
24+
except NameError:
25+
class Tags(object):
26+
def has(self, *args):
27+
return False
28+
29+
tags = Tags()
30+
31+
# -- General configuration ----------------------------------------------------
32+
33+
needs_sphinx = '1.0'
34+
35+
extensions = [
36+
'sphinx.ext.extlinks',
37+
'sphinx.ext.todo',
38+
'mongodb',
39+
'directives',
40+
'intermanual',
41+
'testcode'
42+
]
43+
44+
locale_dirs = [ os.path.join(conf.paths.projectroot, conf.paths.locale) ]
45+
gettext_compact = False
46+
47+
templates_path = ['.templates']
48+
exclude_patterns = []
49+
50+
source_suffix = '.txt'
51+
52+
master_doc = sconf.master_doc
53+
language = 'en'
54+
project = sconf.project
55+
copyright = u'2008-{0}'.format(datetime.date.today().year)
56+
57+
rst_epilog = '\n'.join([
58+
'.. |copy| unicode:: U+000A9',
59+
'.. |ent-build| replace:: MongoDB Enterprise',
60+
'.. |year| replace:: {0}'.format(datetime.date.today().year),
61+
'.. |hardlink| replace:: {0}/{1}'.format(conf.project.url, conf.git.branches.current),
62+
'.. |branch| replace:: ``{0}``'.format(conf.git.branches.current),
63+
'.. |bi| replace:: MongoDB Connector for BI',
64+
])
65+
66+
pygments_style = 'sphinx'
67+
68+
extlinks = {
69+
'hardlink' : ( 'http://docs.mongodb.com/{0}/%s'.format(conf.git.branches.current), ''),
70+
'issue': ('https://jira.mongodb.org/browse/%s', '' ),
71+
'api': ('https://api.mongodb.com/%s', ''),
72+
'gettingstarted': ('https://docs.mongodb.com/getting-started%s', ''),
73+
'manual': ('https://docs.mongodb.com/manual%s', ''),
74+
'ecosystem': ('https://docs.mongodb.com/ecosystem%s', ''),
75+
'mms-docs': ('https://docs.cloudmanager.mongodb.com%s', ''),
76+
'mms-home': ('https://www.mongodb.com/cloud/cloud-manager%s', ''),
77+
'opsmgr': ('https://docs.opsmanager.mongodb.com/current%s', ''),
78+
'products': ('https://www.mongodb.com/products%s', ''),
79+
'wtdocs': ('http://source.wiredtiger.com/mongodb-3.4%s', ''),
80+
81+
}
82+
83+
## add `extlinks` for each published version.
84+
for i in conf.git.branches.published:
85+
extlinks[i] = ( ''.join([ conf.project.url, '/', i, '%s' ]), '' )
86+
87+
intersphinx_mapping = {}
88+
for i in conf.system.files.data.intersphinx:
89+
intersphinx_mapping[i.name] = ( i.url, os.path.join(conf.paths.projectroot,
90+
conf.paths.output,
91+
i.path))
92+
93+
languages = [
94+
("ar", "Arabic"),
95+
("cn", "Chinese"),
96+
("cs", "Czech"),
97+
("de", "German"),
98+
("es", "Spanish"),
99+
("fr", "French"),
100+
("hu", "Hungarian"),
101+
("id", "Indonesian"),
102+
("it", "Italian"),
103+
("jp", "Japanese"),
104+
("ko", "Korean"),
105+
("lt", "Lithuanian"),
106+
("pl", "Polish"),
107+
("pt", "Portuguese"),
108+
("ro", "Romanian"),
109+
("ru", "Russian"),
110+
("tr", "Turkish"),
111+
("uk", "Ukrainian")
112+
]
113+
114+
# -- Options for HTML output ---------------------------------------------------
115+
116+
html_theme = sconf.theme.name
117+
html_theme_path = [ os.path.join(conf.paths.buildsystem, 'themes') ]
118+
html_title = conf.project.title
119+
htmlhelp_basename = 'MongoDBdoc'
120+
121+
html_copy_source = False
122+
html_use_smartypants = True
123+
html_domain_indices = True
124+
html_use_index = True
125+
html_split_index = False
126+
html_show_sourcelink = False
127+
html_show_sphinx = True
128+
html_show_copyright = True
129+
130+
manual_edition_path = '{0}/{1}/{2}'.format(conf.project.url,
131+
conf.git.branches.current,
132+
sconf.theme.book_path_base)
133+
134+
html_theme_options = {
135+
'branch': conf.git.branches.current,
136+
'pdfpath': manual_edition_path + '-' + conf.git.branches.current + '.pdf',
137+
'epubpath': manual_edition_path + '.epub',
138+
'manual_path': get_manual_path(conf),
139+
'translations': languages,
140+
'language': language,
141+
'repo_name': sconf.theme.repo,
142+
'jira_project': sconf.theme.jira,
143+
'google_analytics': sconf.theme.google_analytics,
144+
'project': sconf.theme.project,
145+
'sitename': sconf.theme.sitename,
146+
'nav_excluded': sconf.theme.nav_excluded,
147+
}
148+
149+
html_sidebars = sconf.sidebars
150+
151+
# -- Options for LaTeX output --------------------------------------------------
152+
153+
latex_documents = []
154+
if 'pdfs' in conf.system.files.data:
155+
for pdf in conf.system.files.data.pdfs:
156+
latex_documents.append((pdf.source, pdf.output, pdf.title, pdf.author, pdf.doc_class))
157+
158+
latex_preamble_elements = [ r'\DeclareUnicodeCharacter{FF04}{\$}',
159+
r'\DeclareUnicodeCharacter{FF0E}{.}',
160+
r'\DeclareUnicodeCharacter{2713}{Y}',
161+
r'\PassOptionsToPackage{hyphens}{url}',
162+
r'\usepackage{upquote}',
163+
r'\pagestyle{plain}',
164+
r'\pagenumbering{arabic}' ]
165+
latex_elements = {
166+
'preamble': '\n'.join(latex_preamble_elements),
167+
'pointsize': '10pt',
168+
'papersize': 'letterpaper',
169+
'tableofcontents': '\\textcopyright{ MongoDB, Inc. 2008 - 2016 } This work is licensed under a \href{http://creativecommons.org/licenses/by-nc-sa/3.0/us/}{Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States License}\\clearpage\\tableofcontents'
170+
}
171+
172+
latex_paper_size = 'letter'
173+
latex_use_parts = False
174+
latex_show_pagerefs = True
175+
latex_show_urls = 'footnote'
176+
latex_domain_indices = False
177+
latex_logo = None
178+
latex_appendices = []
179+
180+
# -- Options for manual page output --------------------------------------------
181+
182+
man_pages = []
183+
if 'manpages' in conf.system.files.data:
184+
for mp in conf.system.files.data.manpages:
185+
man_pages.append((mp.file, mp.name, mp.title, mp.authors, mp.section))
186+
187+
# -- Options for Epub output ---------------------------------------------------
188+
189+
# Bibliographic Dublin Core info.
190+
epub_title = conf.project.title
191+
epub_author = u'MongoDB, Inc.'
192+
epub_publisher = u'MongoDB, Inc.'
193+
epub_copyright = u'MongoDB, Inc. 2008 - 2016'
194+
epub_theme = 'epub_mongodb'
195+
epub_tocdup = True
196+
epub_tocdepth = 3
197+
epub_language = language
198+
epub_scheme = 'url'
199+
epub_identifier = ''.join([conf.project.url, '/', conf.git.branches.current])
200+
epub_exclude_files = []
201+
202+
epub_pre_files = []
203+
epub_post_files = []
204+
205+
# put it into your conf.py
206+
def setup(app):
207+
# disable versioning for speed
208+
from sphinx.builders.gettext import I18nBuilder
209+
I18nBuilder.versioning_method = 'none'
210+
211+
def doctree_read(app, doctree):
212+
if not isinstance(app.builder, I18nBuilder):
213+
return
214+
from docutils import nodes
215+
from sphinx.versioning import add_uids
216+
list(add_uids(doctree, nodes.TextElement))
217+
app.connect('doctree-read', doctree_read)

config/build_conf.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
git:
2+
remote:
3+
upstream: 'mongodb/docs-meta'
4+
tools: 'mongodb/docs-tools'
5+
project:
6+
name: 'meta'
7+
tag: 'meta'
8+
url: 'https://docs.mongodb.com/meta'
9+
title: 'MongoDB Meta Documentation'
10+
branched: false
11+
system:
12+
files:
13+
- 'sphinx_local.yaml'
14+
- 'integration.yaml'
15+
- 'intersphinx.yaml'
16+
assets:
17+
- branch: master
18+
path: build/docs-tools
19+
repository: https://github.com/mongodb/docs-tools.git
20+
paths:
21+
output: 'build'
22+
source: 'source'
23+
includes: 'source/includes'
24+
tools: 'bin'
25+
buildsystem: 'build/docs-tools'
26+
builddata: 'config'
27+
locale: 'locale'
28+
...

0 commit comments

Comments
 (0)