# -*- coding: utf-8 -*-
#
# High Level Systems Administration documentation build configuration file, created by
# sphinx-quickstart on Thu Oct 20 09:29:36 2011.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.

import sys
import os
import datetime

from giza.config.runtime import RuntimeStateConfig
from giza.config.helper import fetch_config

import alabaster

conf = fetch_config(RuntimeStateConfig())
sconf = conf.system.files.data.sphinx_local

# -- General configuration -----------------------------------------------------

needs_sphinx = '1.0'
extensions = ["sphinx.ext.intersphinx", "sphinx.ext.extlinks", "alabaster"]
templates_path = [os.path.join(conf.paths.projectroot, 'templates'),
                  os.path.join(conf.paths.projectroot, conf.paths.buildsystem, 'templates')]
source_suffix = '.txt'
master_doc = 'index'

# General information about the project.
project = u'Cyborg Institute'
copyright = u'2011-{0}, Contributors to the Cyborg Institute'.format(datetime.date.today().year)

version = ''
release = version

exclude_patterns = []
pygments_style = 'sphinx'

extlinks = {
    'project': ('/projects/%s', ''),
    'institute': ('http://cyborginstitute.com/%s', ''),
    'issues': ('http://issues.cyborginstitute.com/%s', ''),
    'list': ('http://lists.cyborginstitute.com/listinfo/%s', ''),
    'git': ('http://git.cyborginstitute.com/%s', ''),
    'github': ('http://github.com/cyborginstitute/%s', '')
    }


# -- Options for HTML output ---------------------------------------------------

git_name = 'institute'

html_theme = sconf.theme.name
html_theme_path = [ os.path.join(conf.paths.output, 'institute-tools', 'themes'), alabaster.get_path() ]
html_static_path = ['.static']

html_use_smartypants = True

html_theme_options = {
    'analytics_id': sconf.theme.google_analytics,
    'github_user': 'cyborgisntitute',
    'github_repo': 'administration',
    'github_button': True,
}


html_sidebars = sconf.sidebars
html_title = sconf.theme.sitename
html_short_title = html_title

html_use_index = True
html_show_sourcelink = False
html_show_sphinx = False
html_show_copyright = True
htmlhelp_basename = 'cyborg-institute'
