2121yaml_support ()
2222
2323from mkdocs .config import config_options
24+ from mkdocs .config .config_options import ListOfItems
2425from mkdocs .config .config_options import Type as PluginType
2526from mkdocs .plugins import BasePlugin
2627from 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