예제 #1
0
 def setUpClass(cls):
     comments = mkdcomments.CommentsExtension()
     cls.markdowner = markdown.Markdown(extensions=[comments])
예제 #2
0
from flask import Flask, render_template, url_for
from flask_flatpages import FlatPages
from flask_frozen import Freezer
import markdown
import mkdcomments
import pymdownx.arithmatex as arithmatex

FLATPAGES_EXTENSION = '.md'
DEBUG = True

# attr_list: heading anchor
# pymdownx.arithmatex: latex
# tables: table

comments = mkdcomments.CommentsExtension()

extension_configs = {
    "pymdownx.highlight": {
        "pygments_style": "tango",
        "noclasses": True,
        "linenums": False
    }
}

md = markdown.Markdown(extensions=[
    'tables', 'attr_list', 'pymdownx.highlight', 'pymdownx.inlinehilite',
    'pymdownx.arithmatex', comments, 'pymdownx.superfences'
],
                       extension_configs=extension_configs)