in init.py is the onlydef define_env(env) function across the repo. Within the @env.macros function you call functions that you import from other py files:
from .model import list_of_tables,meta_header,data_header
from .logic import create_zip_file
from .model import create_md_table
def define_env(env):
@env.macro
def download_as_xlsx():
s = create_zip_file()
return s
@env.macro
def create_tables():
s = create_md_table(list_of_tables,meta_header,data_header,'pipe')
return s
....
@fuchsst how I managed to do it is as follows: (@fralau pls correct me if there is a smoother way)
in init.py is the only
def define_env(env)
function across the repo. Within the @env.macros function you call functions that you import from other py files:_Originally posted by @lennizle in https://github.com/fralau/mkdocs_macros_plugin/discussions/120#discussioncomment-2131444_