Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 # This Source Code Form is subject to the terms of the Mozilla Public
2 # License, v. 2.0. If a copy of the MPL was not distributed with this
3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 from __future__ import unicode_literals
7 import os
8 import re
10 from datetime import datetime
13 mozilla_dir = os.environ['MOZILLA_DIR']
15 import mdn_theme
17 extensions = [
18 'sphinx.ext.autodoc',
19 'sphinx.ext.graphviz',
20 'sphinx.ext.todo',
21 'mozbuild.sphinx',
22 ]
24 templates_path = ['_templates']
25 source_suffix = '.rst'
26 master_doc = 'index'
27 project = u'Mozilla Source Tree Docs'
28 year = datetime.now().year
30 # Grab the version from the source tree's milestone.
31 # FUTURE Use Python API from bug 941299.
32 with open(os.path.join(mozilla_dir, 'config', 'milestone.txt'), 'rt') as fh:
33 for line in fh:
34 line = line.strip()
36 if not line or line.startswith('#'):
37 continue
39 release = line
40 break
42 version = re.sub(r'[ab]\d+$', '', release)
44 exclude_patterns = ['_build']
45 pygments_style = 'sphinx'
47 html_theme_path = [mdn_theme.get_theme_dir()]
48 html_theme = 'mdn'
50 html_static_path = ['_static']
51 htmlhelp_basename = 'MozillaTreeDocs'