tools/docs/conf.py
author Birunthan Mohanathas <birunthan@mohanathas.com>
Wed, 16 Jul 2014 12:02:34 -0700
changeset 194423 faecfa9d0bb6c46e32934182e6154758190262ed
parent 193783 b5ce59bda9b9442f59b015df13fc4322159e0dd0
child 197937 fdabd8fe19c019169aeba40265613211922699b8
permissions -rw-r--r--
Bug 1028565 - Part 5: Flatten editor/{idl,public}/ directories. r=ehsan

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

from __future__ import unicode_literals

import os
import re

from datetime import datetime


mozilla_dir = os.environ['MOZILLA_DIR']

import mdn_theme

extensions = [
    'sphinx.ext.autodoc',
    'sphinx.ext.graphviz',
    'sphinx.ext.todo',
    'mozbuild.sphinx',
    'javasphinx',
]

templates_path = ['_templates']
source_suffix = '.rst'
master_doc = 'index'
project = u'Mozilla Source Tree Docs'
year = datetime.now().year

# Grab the version from the source tree's milestone.
# FUTURE Use Python API from bug 941299.
with open(os.path.join(mozilla_dir, 'config', 'milestone.txt'), 'rt') as fh:
    for line in fh:
        line = line.strip()

        if not line or line.startswith('#'):
            continue

        release = line
        break

version = re.sub(r'[ab]\d+$', '', release)

exclude_patterns = ['_build']
pygments_style = 'sphinx'

# TODO MDN theme is busted (bug 987332)
#html_theme_path = [mdn_theme.get_theme_dir()]
#html_theme = 'mdn'

html_static_path = ['_static']
htmlhelp_basename = 'MozillaTreeDocs'