sphinxnotes-data¶
Introduction¶
Define, constrain, and render data in Sphinx documentation.
This is a POC (Proof of Concept) of the sphinxnotes.render extension.
Getting Started¶
Note
We assume you already have a Sphinx documentation, if not, see Getting Started with Sphinx.
First, downloading extension from PyPI:
$ pip install sphinxnotes-data
Then, add the extension name to extensions configuration item in your
conf.py:
extensions = [
# …
'sphinxnotes.data',
# …
]
Before defining any data, we need to create template using the
data.template directive, to tell extension how to render the data:
.. data.template::
Hi human! I am a cat named {{ name }}, I have {{ color }} fur.
{{ content }}.
The above template will not change the document and will just create a temporary template for later use.
We can define data now, using a data.define directive:
.. data.define:: mimi
:color: black and brown
I like fish!
Hi human! I am a cat named mimi, I have black and brown fur.
I like fish!.
For details, see Usage.
Contents¶
The Sphinx Notes Project¶
The project is developed by Shengyu Zhang, as part of The Sphinx Notes Project.