X-Git-Url: https://jxself.org/git/?p=ibg.git;a=blobdiff_plain;f=conf.py;h=d7cd39c416efe6328b594eaff2b9ab8fc36d71a2;hp=5d882f2bdcab2c10cfd7122e1c5a90ddef6eb16c;hb=4261ff48a6357e2af0957f5e1b88bdc022243d16;hpb=a94081289bc21041a8daac44d8c8b6714a831281 diff --git a/conf.py b/conf.py index 5d882f2..d7cd39c 100644 --- a/conf.py +++ b/conf.py @@ -17,11 +17,17 @@ import sys import string import codecs +import alabaster +if alabaster.version.__version_info__ < (0, 7, 8): + raise RuntimeError("requires albaster 0.7.8 or newer") + # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.insert(0, ".") +import tools.sphinxpatch + from tools.inform import InformLexer from tools.transcript import TranscriptLexer @@ -40,6 +46,7 @@ def setup(app): # ones. extensions = [ 'sphinx.ext.todo', + 'sphinx.ext.extlinks', 'tools.blockdiag', ] @@ -107,6 +114,14 @@ default_role = "any" # output. They are ignored by default. #show_authors = False +# Global definitions. +rst_prolog = open("config/defs.rst").read() + +# External links. +extlinks = { + 'dm4': ("http://inform-fiction.org/manual/html/%s", ""), +} + # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'friendly' @@ -122,6 +137,9 @@ highlight_language = 'none' # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = True +# Turn off default domain. +primary_domain = None + # -- Options for HTML output ---------------------------------------------- @@ -129,6 +147,9 @@ todo_include_todos = True # a list of builtin themes. html_theme = 'alabaster' +# Override a few things with local CSS style. +html_style = "ibg.css" + # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. @@ -137,6 +158,7 @@ html_theme_options = { 'head_font_family': 'Georgia', 'page_width': '1050px', 'show_related': True, + 'fixed_sidebar': True, } # Add any paths that contain custom themes here, relative to this directory. @@ -161,7 +183,7 @@ html_title = project # 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'] +html_static_path = ['static'] # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied @@ -229,7 +251,7 @@ htmlhelp_basename = 'IBG' # -- Options for LaTeX output --------------------------------------------- # Title page information. -latex_image = "harry1" +latex_image = "harry_col" latex_image_title = "First Steps" latex_image_info = "(watercolour and crayon on paper, 2002) Harry Firth (2000-)" latex_image_path = os.path.join('images', latex_image + '.png') @@ -288,7 +310,7 @@ latex_documents = [ #latex_use_parts = False # If true, show page references after internal links. -latex_show_pagerefs = False +latex_show_pagerefs = True # If true, show URL addresses after external links. #latex_show_urls = False