Skip to content

Commit 1604bdc

Browse files
committed
update
1 parent 9e12d78 commit 1604bdc

9 files changed

Lines changed: 25 additions & 323 deletions

File tree

File renamed without changes.
File renamed without changes.

docs/fw/usage.rst renamed to docs/dev.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
=====
2-
Usage
3-
=====
1+
=================================================
2+
Guide: Developing based on ``sphinxnotes.render``
3+
=================================================
44

55
.. seealso::
66

@@ -17,7 +17,7 @@ Sphinx and inserted into the document.
1717
Now we have a quick example to help you get Started.
1818
Create a Sphinx documentation with the following ``conf.py``:
1919

20-
.. literalinclude:: ../../tests/roots/test-ctxdir-usage/conf.py
20+
.. literalinclude:: ../tests/roots/test-ctxdir-usage/conf.py
2121

2222
This is the smallest useful extension built on top of ``sphinxnotes.render``:
2323

File renamed without changes.
File renamed without changes.

docs/fw/tmpl.rst

Lines changed: 0 additions & 301 deletions
This file was deleted.

docs/index.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Getting Started
4646
.. note::
4747

4848
In this section we discuss how to use the extension. For the usage of
49-
the framework, please refer to :doc:`/fw/usage`.
49+
the framework, please refer to :doc:`dev`.
5050

5151
.. note::
5252

@@ -147,20 +147,20 @@ Contents
147147

148148
.. toctree::
149149
:caption: Extension
150+
:maxdepth: 1
150151

151-
app/usage
152-
app/tmpl
153-
app/conf
152+
usage
153+
conf
154154

155155
.. toctree::
156156
:caption: Framework
157-
:maxdepth: 2
157+
:maxdepth: 1
158158

159-
fw/usage
160-
fw/tmpl
161-
fw/ext
162-
fw/dsl
163-
fw/api
159+
tmpl
160+
ext
161+
dev
162+
dsl
163+
api
164164

165165
The Sphinx Notes Project
166166
========================

docs/app/tmpl.rst renamed to docs/tmpl.rst

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,13 @@ For ``sphinxnotes.render.ext``, you can use :rst:dir:`data.template` or
2929

3030

3131
What Data is Available
32-
=======================
32+
======================
3333

3434
Your template receives data from two sources: **main context** and **extra
3535
context**.
3636

37+
.. _context:
38+
3739
Main Context
3840
------------
3941

@@ -410,12 +412,13 @@ Enable the debug option to see a detailed report when troubleshooting templates:
410412
This is especially useful when a template fails due to an undefined variable,
411413
unexpected data shape, or invalid generated markup.
412414

413-
Jinja Template Technical Details
414-
================================
415+
Some Technical Details
416+
======================
417+
418+
Jinja Template
419+
--------------
415420

416421
Templates are rendered in a sandboxed Jinja2 environment.
417422

418423
- Undefined variables raise errors by default (``undefined=DebugUndefined``)
419424
- Extension ``jinja2.ext.loopcontrols``, ``jinja2.ext.do`` are enabled by default.
420-
- Output is plain markup text, so you can generate lists, directives, roles,
421-
and other reStructuredText constructs.

0 commit comments

Comments
 (0)