Sphinx extension to add a global table of contents to JSON output files.
Project description
sphinxcontrib-jsonglobaltoc
This Sphinx extension extends JSONHTMLBuilder
from
sphinxcontrib-serializinghtml
to add a globaltoc
key to each .fjson
file
produced. globaltoc
will contain the HTML for the global table of contents
for the entire set of documentation.
Getting It
You can get sphinxcontrib-jsonglobaltoc
by using pip:
pip install sphinxcontrib-jsonglobaltoc
If you want to install it from source, grab the git repository from GitHub and run setup.py
:
git clone git://github.com/caltechads/sphinxcontrib-jsonglobaltoc.git
cd sphinxcontrib-jsonglobaltoc
python setup.py install
Installing It
To enable sphinxcontrib-jsonglobaltoc
in your Sphinx project, you need to add it to extensions
list
in your conf.py
:
extensions = [
...
'sphinx_json_globaltoc',
...
]
Using It
In your Sphinx docs folder, produce your jsonhtml
output like so:
make json
Now if you open one of your .ftjson
files and examine it, you
should see a globaltoc
key. For example:
>>> import json
>>> with open('build/json/index.fjson', encoding='utf-8') as index:
... data = json.load(index)
>>> index['globaltoc']
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for sphinxcontrib-jsonglobaltoc-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71c4670f9f3f05d4af81160fc42444c7159c1595386bc7e634b693bd7afd3a11 |
|
MD5 | e4530392a935e938f9dfe72a1cbb1693 |
|
BLAKE2b-256 | 1b30d6df02f7be53b9acab3cba38cc979eecb7960c9215f68d36922b4a951eff |
Hashes for sphinxcontrib_jsonglobaltoc-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 486433c06bc43b5482946f80b7d491dd947e84a514b29a55ab567d2a84a9da58 |
|
MD5 | fdffac389fabcebbf9aeff797077f54d |
|
BLAKE2b-256 | f0b44382f0ec95919abf7fd82020402f47468486166df6fa01388515e98b868f |