diff options
| author | sommersoft <sommersoft@gmail.com> | 2019-07-04 01:19:56 -0500 |
|---|---|---|
| committer | sommersoft <sommersoft@gmail.com> | 2019-07-04 01:19:56 -0500 |
| commit | 4342383d9595914786475aa55c001864333ddcc1 (patch) | |
| tree | bcdfda700a6bf1055519bf9182c6e393eb668f53 /conf.py | |
| parent | f1256c0b35d8ff3e1893bd345a6ff29c2ee2e752 (diff) | |
add jinja extension; update shared-bindings/index.rst to use jinja
Diffstat (limited to 'conf.py')
| -rw-r--r-- | conf.py | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -13,6 +13,7 @@ # All configuration values have a default; values that are commented out # serve to show the default. +import json import sys import os @@ -26,6 +27,19 @@ sys.path.insert(0, os.path.abspath('.')) master_doc = 'docs/index' +# Grab the JSON values to use while building the module support matrix +# in 'shared-bindings/index.rst' +shared_bindings_json = 'support_matrix.json' +if 'TRAVIS' in os.environ: + shared_bindings_json = os.path.join('$HOME', shared_bindings_json) +else: + shared_bindings_json = os.path.join('shared-bindings', shared_bindings_json) +with open(shared_bindings_json) as json_file: + modules_support_matrix = json.load(json_file) +html_context = { + 'support_matrix': modules_support_matrix +} + # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. @@ -40,7 +54,8 @@ extensions = [ 'sphinxcontrib.rsvgconverter', 'sphinx.ext.intersphinx', 'sphinx.ext.todo', - 'sphinx.ext.coverage' + 'sphinx.ext.coverage', + 'rstjinja' ] # Add any paths that contain templates here, relative to this directory. |
