forked from metaborg/documentation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconf.py
executable file
·91 lines (69 loc) · 2.11 KB
/
conf.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
import os
import recommonmark
from recommonmark.parser import CommonMarkParser
from recommonmark.transform import AutoStructify
# -- General configuration
extensions = [
'sphinx.ext.todo',
'sphinx.ext.imgmath',
'sphinx.ext.intersphinx',
'javasphinx'
]
imgmath_image_format = 'svg'
templates_path = ['_templates']
source_parsers = {
'.md': CommonMarkParser,
}
source_suffix = ['.rst', '.md']
master_doc = 'index'
project = 'Spoofax'
copyright = '2016-2017, MetaBorg'
author = 'MetaBorg'
version = '2.2.0'
release = version
language = None
exclude_patterns = ['_build', 'notes', 'include', 'README.md']
pygments_style = 'sphinx'
todo_include_todos = True
# Include include/_all.rst in all documents.
rst_prolog = """
.. include:: /include/_all.rst
"""
# -- Options for HTML output
# Only import and set the ReadTheDocs theme if we're building docs locally.
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
if not on_rtd:
import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
html_static_path = ['_static']
htmlhelp_basename = 'Spoofaxdoc'
# -- Options for LaTeX output
latex_documents = [
(master_doc, 'Spoofax.tex', 'Spoofax Documentation', 'MetaBorg', 'manual'),
]
# -- Options for manual page output
man_pages = [
(master_doc, 'spoofax', 'Spoofax Documentation', [author], 1)
]
# -- Options for Texinfo output
texinfo_documents = [
(master_doc, 'Spoofax', 'Spoofax Documentation', author, 'Spoofax', 'Spoofax documentation', 'Miscellaneous')
]
# -- Options for Epub output
epub_title = project
epub_author = author
epub_publisher = author
epub_copyright = copyright
epub_exclude_files = ['search.html']
# -- Options for intersphix extension
spoofax_api_loc = 'http://www.metaborg.org/projects/spoofax-api/en/latest/'
intersphinx_mapping = {'api': (spoofax_api_loc, None)}
# -- Additional Sphinx configuration
def setup(app):
app.add_config_value('recommonmark_config', {'auto_toc_tree_section': 'Contents'}, 'env')
app.add_transform(AutoStructify)
app.add_stylesheet("custom.css")