How to install datatemplates extension?
kevung opened this issue · 2 comments
kevung commented
Hello,
Thank you for your work. There is no instruction on how to install this extension, even in the manual.
I am struggling to make it work with a very simple JSON inline example.
- I installed the extension:
pip install sphinxcontrib.datatemplates
- I added the extension to
conf.py
:extensions = [ #other extensions... "sphinxcontrib.datatemplates"
- I created a
test.json
file:
{
"allo": "test"
}
- I included in a rst file:
.. datatemplate:json::
:source: test.json
Toto
----
{{ data['allo'] }}
The Sphinx documentation builds printing the raw instruction {{ data['allo'] }}
instead of test
.