Newer
Older
PLUGINS = [
'flamingo.plugins.Redirects',
'flamingo.plugins.rstPygments',
'plugins/title.py::Title',
'plugins/relative_media_urls.py::RelativeMediaUrls',
'plugins/thumbnails.py::Thumbnails',
@flamingo.hook("contents_parsed")
def fix_headings(context):
for content in context.contents:
if os.path.splitext(content["path"])[-1] == ".html":
continue
cb = content["content_body"]
cb = cb.replace("h3>", "h4>")
cb = cb.replace("h2>", "h3>")
content["content_body"] = cb