sphinxnotes-data

Documentation Status Open Source License PyPI Package PyPI Package Downloads GitHub Repository

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 template directive, to tell extension how to render the 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 directive:

Source
.. data:: mimi
   :color: black and brown

   I like fish!
Result

For details, see Usage.

Contents

The Sphinx Notes Project

The project is developed by Shengyu Zhang, as part of The Sphinx Notes Project.

The Sphinx Notes Project