Skip to content
Snippets Groups Projects
settings.py 703 B
Newer Older
chrissi^'s avatar
chrissi^ committed
import flamingo
THEME_PATHS = [
Tim's avatar
Tim committed
        'theme/',
PLUGINS = [
    'flamingo.plugins.Redirects',
    'flamingo.plugins.rstPygments',
    'plugins/title.py::Title',
    'plugins/relative_media_urls.py::RelativeMediaUrls',
    'plugins/thumbnails.py::Thumbnails',
MEDIA_PREFIX = "."

HTML_PARSER_RAW_HTML = True

chrissi^'s avatar
chrissi^ committed
@flamingo.hook("contents_parsed")
def fix_headings(context):
    for content in context.contents:
        if os.path.splitext(content["path"])[-1] == ".html":
            continue
chrissi^'s avatar
chrissi^ committed
        cb = content["content_body"]
        cb = cb.replace("h3>", "h4>")
        cb = cb.replace("h2>", "h3>")
        content["content_body"] = cb

chrissi^'s avatar
chrissi^ committed
POST_BUILD_LAYERS = [
chrissi^'s avatar
chrissi^ committed
        'downloads',