Skip to content

Commit ec8d385

Browse files
committed
refactor: Refactor render mod again, provides __all__ to outside
1 parent e70a718 commit ec8d385

File tree

14 files changed

+651
-594
lines changed

14 files changed

+651
-594
lines changed

docs/index.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,9 @@ Introduction
5656

5757
.. template::
5858

59-
I am an inline *{{ content }}*
59+
Cur builder: {{ _sphinx.builder.nam }}
6060

61-
:data:`text`
62-
63-
:pep:`abc`
61+
:data:`foo`
6462

6563
.. INTRODUCTION END
6664

src/sphinxnotes/data/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,17 @@
2424
Schema,
2525
)
2626
from .render import (
27+
Phase,
28+
Template,
29+
Host,
2730
pending_data,
2831
rendered_data,
2932
BaseDataDefineRole,
3033
BaseDataDefineDirective,
3134
StrictDataDefineDirective,
35+
ExtraContextRegistry,
36+
ExtraContextGenerator,
3237
)
33-
from .render.template import Template
34-
from .render.renderer import Host
35-
from .render.extractx import ExtraContextRegistry, ExtraContextGenerator
3638
from .config import Config
3739

3840
if TYPE_CHECKING:
@@ -83,10 +85,8 @@ def setup(app: Sphinx):
8385
meta.pre_setup(app)
8486

8587
from . import config, render, adhoc
86-
from .render import template
8788

8889
config.setup(app)
89-
template.setup(app)
9090
render.setup(app)
9191
adhoc.setup(app)
9292

src/sphinxnotes/data/adhoc.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@
2222
from sphinx.util.docutils import SphinxDirective
2323

2424
from .data import Field, Schema
25-
from .render.template import Template
26-
from .render.nodes import Phase
27-
from .render import BaseDataDefineDirective, BaseDataDefineRole
25+
from .render import Phase, Template, BaseDataDefineDirective, BaseDataDefineRole
2826
from .utils.freestyle import FreeStyleDirective, FreeStyleOptionSpec
2927
from . import preset
3028

src/sphinxnotes/data/preset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"""
1010

1111
from .data import Schema, Field
12-
from .render.template import Template
12+
from .render import Template
1313

1414

1515
class Directive:

0 commit comments

Comments
 (0)