tools/docs/conf.py

Wed, 31 Dec 2014 06:55:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:55:50 +0100
changeset 2
7e26c7da4463
permissions
-rw-r--r--

Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2

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

mercurial