## Macro to render a plain listing with header (if available) # macro render_monthlist(heading, posts)
# if heading:

${heading}

# else: ${heading} # endif # if not posts:

No blog posts.

# endif
# endmacro {# Directly execute the macro on import if 'execute_blog_macro' is set. For this not to throw errors it presumes variables to be called already exists in the data dictionary. #} # if execute_blog_macro:
${render_monthlist(heading, posts)}
# endif