1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/tools/docs/conf.py Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,51 @@ 1.4 +# This Source Code Form is subject to the terms of the Mozilla Public 1.5 +# License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 +# file, You can obtain one at http://mozilla.org/MPL/2.0/. 1.7 + 1.8 +from __future__ import unicode_literals 1.9 + 1.10 +import os 1.11 +import re 1.12 + 1.13 +from datetime import datetime 1.14 + 1.15 + 1.16 +mozilla_dir = os.environ['MOZILLA_DIR'] 1.17 + 1.18 +import mdn_theme 1.19 + 1.20 +extensions = [ 1.21 + 'sphinx.ext.autodoc', 1.22 + 'sphinx.ext.graphviz', 1.23 + 'sphinx.ext.todo', 1.24 + 'mozbuild.sphinx', 1.25 +] 1.26 + 1.27 +templates_path = ['_templates'] 1.28 +source_suffix = '.rst' 1.29 +master_doc = 'index' 1.30 +project = u'Mozilla Source Tree Docs' 1.31 +year = datetime.now().year 1.32 + 1.33 +# Grab the version from the source tree's milestone. 1.34 +# FUTURE Use Python API from bug 941299. 1.35 +with open(os.path.join(mozilla_dir, 'config', 'milestone.txt'), 'rt') as fh: 1.36 + for line in fh: 1.37 + line = line.strip() 1.38 + 1.39 + if not line or line.startswith('#'): 1.40 + continue 1.41 + 1.42 + release = line 1.43 + break 1.44 + 1.45 +version = re.sub(r'[ab]\d+$', '', release) 1.46 + 1.47 +exclude_patterns = ['_build'] 1.48 +pygments_style = 'sphinx' 1.49 + 1.50 +html_theme_path = [mdn_theme.get_theme_dir()] 1.51 +html_theme = 'mdn' 1.52 + 1.53 +html_static_path = ['_static'] 1.54 +htmlhelp_basename = 'MozillaTreeDocs'