I didn't like the other figure + figcaption parsers, they either assumed a lot about usage (e.g. images only), or they were inline parsers that either wrapped the figure in a paragraph tag (which is incorrect syntax) or did span trickery (annoying) so, this handles images and maybe other things, and does things properly with figures as their own blocks. incomplete but it works with my images, and should allow for looping (for multi-line content) in the future?
58 lines
1.4 KiB
Python
58 lines
1.4 KiB
Python
"""Default configuration."""
|
|
|
|
|
|
class Config(object):
|
|
"""Represent the default configuration.
|
|
|
|
Reminder: this should be overwritten in the instance config.py, not here!
|
|
"""
|
|
|
|
DEBUG = False
|
|
TESTING = False
|
|
|
|
LOGGING = {
|
|
'version': 1,
|
|
'formatters': {
|
|
'default': {
|
|
'format': '[%(asctime)s %(levelname)-7s %(name)s] %(message)s',
|
|
},
|
|
},
|
|
'handlers': {
|
|
'console': {
|
|
'level': 'DEBUG',
|
|
'class': 'logging.StreamHandler',
|
|
'formatter': 'default',
|
|
},
|
|
},
|
|
'loggers': {
|
|
'': {
|
|
'level': 'INFO',
|
|
'handlers': ['console'],
|
|
},
|
|
},
|
|
}
|
|
|
|
MARKDOWN_EXTENSIONS = ['extra', 'incorporealcms.mdx.figures', 'sane_lists', 'smarty', 'toc']
|
|
MARKDOWN_EXTENSION_CONFIGS = {
|
|
'extra': {
|
|
'footnotes': {
|
|
'UNIQUE_IDS': True,
|
|
},
|
|
},
|
|
'smarty': {
|
|
'smart_dashes': True,
|
|
'smart_quotes': False,
|
|
'smart_angled_quotes': False,
|
|
'smart_ellipses': True,
|
|
},
|
|
}
|
|
|
|
MEDIA_DIR = 'media'
|
|
|
|
# customizations
|
|
DEFAULT_PAGE_STYLE = 'light'
|
|
TITLE_SUFFIX = 'example.com'
|
|
CONTACT_EMAIL = 'admin@example.com'
|
|
|
|
# specify FAVICON in your instance config.py to override the provided icon
|