Skip to content

Commit 9a329bc

Browse files
committed
2 parents 2eaf033 + c6ea72a commit 9a329bc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

mkdocs_macros/plugin.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
yaml_support()
2222

2323
from mkdocs.config import config_options
24+
from mkdocs.config.config_options import ListOfItems
2425
from mkdocs.config.config_options import Type as PluginType
2526
from mkdocs.plugins import BasePlugin
2627
from mkdocs.structure.pages import Page
@@ -116,6 +117,7 @@ class MacrosPlugin(BasePlugin):
116117

117118
# what is under the 'macros' namespace (will go into the config property):
118119
J2_STRING = PluginType(str, default='')
120+
J2_STRING_LIST = ListOfItems(J2_STRING, default=[])
119121
config_scheme = (
120122
# main python module:
121123
('module_name', PluginType(str,
@@ -142,6 +144,9 @@ class MacrosPlugin(BasePlugin):
142144
('j2_variable_end_string', J2_STRING),
143145
('j2_comment_start_string', J2_STRING),
144146
('j2_comment_end_string', J2_STRING),
147+
# for including j2 extensions:
148+
# https://jinja.palletsprojects.com/en/stable/extensions/
149+
('j2_extensions', J2_STRING_LIST),
145150
# for behavior of unknown macro (e.g. other plugin):
146151
('on_undefined', PluginType(str, default=DEFAULT_UNDEFINED_BEHAVIOR)),
147152
# for CD/CI set that parameter to true

0 commit comments

Comments
 (0)