sphinx-contrib/datatemplates

How to install datatemplates extension?

kevung opened this issue · 2 comments

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.

  1. I installed the extension: pip install sphinxcontrib.datatemplates
  2. I added the extension to conf.py:
       extensions = [
        #other extensions...
        "sphinxcontrib.datatemplates"
  3. I created a test.json file:
{
   "allo": "test"
}
  1. 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.

I have proposed an update to the documentation to be more detailed about installing the extension. Please take a look at the changes in #77 and let me know if this answers all of your questions.

Thanks, I could successfully use a template with the datatemplates extension ( #76 ) with your new instructions.
I still cannot use with inline Sample (JSON), bit I will open another issue. Thank you !