godot-docs/conf.py

88 lines
2.8 KiB
Python
Raw Normal View History

2015-12-12 16:58:18 +01:00
# -*- coding: utf-8 -*-
#
2015-12-12 17:57:44 +01:00
# Godot Engine documentation build configuration file
2015-12-12 16:58:18 +01:00
import sys
import os
# -- General configuration ------------------------------------------------
2015-12-12 17:57:44 +01:00
needs_sphinx = '1.3'
2015-12-12 16:58:18 +01:00
2015-12-12 17:57:44 +01:00
# Sphinx extension module names and templates location
2016-07-01 04:08:04 +02:00
sys.path.append(os.path.abspath('extensions'))
extensions = ['gdscript', 'sphinx_tabs.tabs']
2015-12-12 16:58:18 +01:00
templates_path = ['_templates']
2015-12-12 17:57:44 +01:00
# You can specify multiple suffix as a list of string: ['.rst', '.md']
2015-12-12 16:58:18 +01:00
source_suffix = '.rst'
2015-12-12 17:57:44 +01:00
source_encoding = 'utf-8-sig'
2015-12-12 16:58:18 +01:00
2015-12-12 17:57:44 +01:00
# The master toctree document
2015-12-12 16:58:18 +01:00
master_doc = 'index'
2015-12-12 17:57:44 +01:00
# General information about the project
project = 'Godot Engine'
2017-01-08 12:47:48 +01:00
copyright = '2014-2017, Juan Linietsky, Ariel Manzur and the Godot community (CC-BY 3.0)'
2015-12-12 17:57:44 +01:00
author = 'Juan Linietsky, Ariel Manzur and the Godot community'
2015-12-12 16:58:18 +01:00
2015-12-12 17:57:44 +01:00
# Version info for the project, acts as replacement for |version| and |release|
# The short X.Y version
version = 'latest'
# The full version, including alpha/beta/rc tags
release = 'latest'
2015-12-12 16:58:18 +01:00
2015-12-12 17:57:44 +01:00
language = 'en'
2015-12-12 16:58:18 +01:00
exclude_patterns = ['_build']
2016-07-01 04:08:04 +02:00
from gdscript import GDScriptLexer
from sphinx.highlighting import lexers
lexers['gdscript'] = GDScriptLexer()
2015-12-12 17:57:44 +01:00
# Pygments (syntax highlighting) style to use
2015-12-12 16:58:18 +01:00
pygments_style = 'sphinx'
2016-07-01 04:08:04 +02:00
highlight_language = 'gdscript'
2015-12-12 16:58:18 +01:00
# -- Options for HTML output ----------------------------------------------
2015-12-12 17:57:44 +01:00
# on_rtd is whether we are on readthedocs.org, this line of code grabbed from docs.readthedocs.org
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
2015-12-12 16:58:18 +01:00
import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
if on_rtd:
using_rtd_theme = True
2015-12-12 16:58:18 +01:00
# Theme options
html_theme_options = {
# 'typekit_id': 'hiw1hhg',
# 'analytics_id': '',
# 'sticky_navigation': True # Set to False to disable the sticky nav while scrolling.
2016-07-20 23:17:05 +02:00
'logo_only': True, # if we have a html_logo below, this shows /only/ the logo with no title text
'collapse_navigation': False, # Collapse navigation (False makes it tree-like)
# 'display_version': True, # Display the docs version
# 'navigation_depth': 4, # Depth of the headers shown in the navigation bar
}
2016-07-20 23:17:05 +02:00
html_logo = 'img/docs_logo.png'
2015-12-12 17:57:44 +01:00
# Output file base name for HTML help builder
2015-12-12 16:58:18 +01:00
htmlhelp_basename = 'GodotEnginedoc'
2015-12-12 17:57:44 +01:00
# -- Options for reStructuredText parser ----------------------------------
2015-12-12 16:58:18 +01:00
2015-12-12 17:57:44 +01:00
# Enable directives that insert the contents of external files
file_insertion_enabled = False
2015-12-12 16:58:18 +01:00
2015-12-12 17:57:44 +01:00
# -- Options for LaTeX output ---------------------------------------------
2015-12-12 16:58:18 +01:00
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
2015-12-12 17:57:44 +01:00
(master_doc, 'GodotEngine.tex', 'Godot Engine Documentation',
'Juan Linietsky, Ariel Manzur and the Godot community', 'manual'),
2015-12-12 16:58:18 +01:00
]