summaryrefslogtreecommitdiff
path: root/docs/users_guide/conf.py
diff options
context:
space:
mode:
authorKavon Farvardin <kavon@farvard.in>2018-09-23 15:29:37 -0500
committerKavon Farvardin <kavon@farvard.in>2018-09-23 15:29:37 -0500
commit84c2ad99582391005b5e873198b15e9e9eb4f78d (patch)
treecaa8c2f2ec7e97fbb4977263c6817c9af5025cf4 /docs/users_guide/conf.py
parent8ddb47cfcf5776e9a3c55fd37947c8a95e00fa12 (diff)
parente68b439fe5de61b9a2ca51af472185c62ccb8b46 (diff)
downloadhaskell-wip/T13904.tar.gz
update to current master againwip/T13904
Diffstat (limited to 'docs/users_guide/conf.py')
-rw-r--r--docs/users_guide/conf.py26
1 files changed, 14 insertions, 12 deletions
diff --git a/docs/users_guide/conf.py b/docs/users_guide/conf.py
index 9c75d5bf97..0732c5ccd4 100644
--- a/docs/users_guide/conf.py
+++ b/docs/users_guide/conf.py
@@ -13,13 +13,21 @@ sys.path.insert(0, os.path.abspath('.'))
from ghc_config import extlinks, version
import ghc_config
-extensions = ['sphinx.ext.extlinks', 'sphinx.ext.mathjax']
+extensions = ['sphinx.ext.extlinks',
+ 'sphinx.ext.mathjax',
+ # GHC-specific extensions
+ 'flags',
+ 'ghc_packages']
templates_path = ['.templates']
source_suffix = '.rst'
source_encoding = 'utf-8-sig'
master_doc = 'index'
+rst_prolog = """
+.. |llvm-version| replace:: {llvm_version}
+""".format(llvm_version=ghc_config.llvm_version)
+
# General information about the project.
project = u'Glasgow Haskell Compiler'
copyright = u'2015, GHC Team'
@@ -32,7 +40,7 @@ pygments_style = 'tango'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
-exclude_patterns = ['.build', "*.gen.rst"]
+exclude_patterns = ['.build']
# -- Options for HTML output ---------------------------------------------
@@ -49,6 +57,9 @@ html_use_smartypants = True
html_use_opensearch = 'https://downloads.haskell.org/~ghc/master/users-guide'
html_show_copyright = True
+# See GHC #15006
+mathjax_path = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js'
+
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
@@ -72,6 +83,7 @@ latex_elements = {
\setsansfont{DejaVu Sans}
\setromanfont{DejaVu Serif}
\setmonofont{DejaVu Sans Mono}
+\setlength{\\tymin}{45pt}
''',
}
@@ -193,16 +205,6 @@ def setup(app):
objname='GHCi command',
indextemplate='pair: %s; GHCi command')
- app.add_object_type('ghc-flag', 'ghc-flag',
- objname='GHC command-line option',
- parse_node=parse_flag,
- indextemplate='pair: %s; GHC option',
- doc_field_types=[
- Field('since', label='Introduced in GHC version', names=['since']),
- Field('default', label='Default value', names=['default']),
- Field('static')
- ])
-
# Haddock references
app.add_role('th-ref', haddock_role('template-haskell'))
app.add_role('base-ref', haddock_role('base'))