|
| 1 | +# Configuration file for the Sphinx documentation builder. |
| 2 | +# |
| 3 | +# This file only contains a selection of the most common options. For a full |
| 4 | +# list see the documentation: |
| 5 | +# https://www.sphinx-doc.org/en/master/usage/configuration.html |
| 6 | + |
| 7 | +# -- Path setup -------------------------------------------------------------- |
| 8 | + |
| 9 | +# If extensions (or modules to document with autodoc) are in another directory, |
| 10 | +# add these directories to sys.path here. If the directory is relative to the |
| 11 | +# documentation root, use os.path.abspath to make it absolute, like shown here. |
| 12 | +# |
| 13 | +import os |
| 14 | +import sys |
| 15 | +from datetime import date |
| 16 | +sys.path.insert(0, os.path.abspath('.')) |
| 17 | + |
| 18 | + |
| 19 | +# -- Project information ----------------------------------------------------- |
| 20 | + |
| 21 | +name = 'WebAssembly Component Model' |
| 22 | +project = 'WebAssembly Component Model' |
| 23 | +title = 'WebAssembly Component Model Specification' |
| 24 | +copyright = '2022 WebAssembly Community Group' |
| 25 | +author = 'Authors of the Webassembly Component Model Specification' |
| 26 | + |
| 27 | +version = u'0.0' |
| 28 | +# The draft version string (clear out for release cuts) |
| 29 | +draft = ' (Draft ' + date.today().strftime("%Y-%m-%d") + ')' |
| 30 | +# The full version, including alpha/beta/rc tags. |
| 31 | +release = version + draft |
| 32 | + |
| 33 | +mathjax_path='https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js' |
| 34 | + |
| 35 | +# -- General configuration --------------------------------------------------- |
| 36 | + |
| 37 | +# Add any Sphinx extension module names here, as strings. They can be |
| 38 | +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
| 39 | +# ones. |
| 40 | +extensions = [ |
| 41 | + 'sphinx.ext.mathjax', |
| 42 | + 'util.mathdef' |
| 43 | +] |
| 44 | + |
| 45 | +# Add any paths that contain templates here, relative to this directory. |
| 46 | +templates_path = ['_templates'] |
| 47 | + |
| 48 | +# List of patterns, relative to source directory, that match files and |
| 49 | +# directories to ignore when looking for source files. |
| 50 | +# This pattern also affects html_static_path and html_extra_path. |
| 51 | +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] |
| 52 | + |
| 53 | + |
| 54 | +# -- Options for HTML output ------------------------------------------------- |
| 55 | + |
| 56 | +# The theme to use for HTML and HTML Help pages. See the documentation for |
| 57 | +# a list of builtin themes. |
| 58 | +# |
| 59 | +html_theme = 'alabaster' |
| 60 | +html_theme_options = { |
| 61 | + 'description': 'WebAssembly Component Model Specification', |
| 62 | + 'fixed_sidebar': True, |
| 63 | + 'sidebar_width': '260px', |
| 64 | + 'sidebar_collapse': True, |
| 65 | + 'show_powered_by': False, |
| 66 | + 'extra_nav_links': { |
| 67 | + 'Index': 'BASEDIR/genindex.html', |
| 68 | + 'Download as PDF': 'BASEDIR/../_download/webassemblycomponentmodel.pdf' |
| 69 | + }, |
| 70 | +} |
| 71 | +html_title = project +u' ' + release |
| 72 | +html_copy_source = False # At least for the one included in docs/ ... |
| 73 | + |
| 74 | +# Add any paths that contain custom static files (such as style sheets) here, |
| 75 | +# relative to this directory. They are copied after the builtin static files, |
| 76 | +# so a file named "default.css" will overwrite the builtin "default.css". |
| 77 | +# html_static_path = ['_static'] |
| 78 | + |
| 79 | +pwd = os.path.abspath('.') |
| 80 | +rst_prolog = """ |
| 81 | +.. include:: /""" + pwd + """/util/macros-core.def |
| 82 | +.. include:: /""" + pwd + """/util/macros.def |
| 83 | +""" |
0 commit comments