hy/docs/conf.py

51 lines
1.5 KiB
Python
Raw Normal View History

2013-03-13 03:53:45 +01:00
# -*- coding: utf-8 -*-
#
# This file is execfile()d with the current directory set to its containing dir.
2017-06-20 23:26:39 +02:00
import re, os, sys, time, cgi
2013-04-15 00:24:37 +02:00
sys.path.append(os.path.abspath(".."))
from get_version import __version__ as hy_version
2017-06-20 23:26:39 +02:00
# Read the Docs might dirty its checkout, so strip the dirty flag.
hy_version = re.sub('[+.]dirty\Z', '', hy_version)
2013-03-13 03:53:45 +01:00
templates_path = ['_templates']
source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
project = u'hy'
2017-05-15 19:09:34 +02:00
copyright = u'%s the authors' % time.strftime('%Y')
2013-03-13 03:53:45 +01:00
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = ".".join(hy_version.split(".")[:-1])
2013-03-13 03:53:45 +01:00
# The full version, including alpha/beta/rc tags.
release = hy_version
hy_descriptive_version = cgi.escape(hy_version)
if "+" in hy_version:
hy_descriptive_version += " <strong style='color: red;'>(unstable)</strong>"
2013-03-13 03:53:45 +01:00
exclude_patterns = ['_build', 'coreteam.rst']
2013-03-13 03:53:45 +01:00
pygments_style = 'sphinx'
2017-05-15 23:16:17 +02:00
import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
2013-03-13 03:53:45 +01:00
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
2017-05-15 23:16:17 +02:00
html_use_smartypants = False
html_show_sphinx = False
html_context = dict(
hy_descriptive_version = hy_descriptive_version)