From 9ed0a3d3ba0557597ecb8ac41d4d3186d41d42dd Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Sat, 20 Apr 2019 11:37:35 +0300 Subject: [PATCH] Pandoc, Markdown --- pelicanconf.py | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/pelicanconf.py b/pelicanconf.py index 3da0675..c4085d8 100644 --- a/pelicanconf.py +++ b/pelicanconf.py @@ -59,7 +59,10 @@ MARKDOWN = { 'markdown.extensions.codehilite': {'css_class': 'highlight'}, 'markdown.extensions.extra': {}, 'markdown.extensions.meta': {}, - }, + 'markdown.extensions.toc': { + 'title': 'Содержание' + }, + } , 'output_format': 'html5', } @@ -77,9 +80,27 @@ I18N_GETTEXT_DOMAIN = 'messages' JINJA_ENVIRONMENT = {'extensions': ['jinja2.ext.i18n']} PLUGIN_PATHS = ["plugins/official", "plugins/thirdparty"] -PLUGINS = [i18n(), "md-metayaml", "render_math", "series", "subcategory", "tag_cloud", "tipue_search", "pelican-css"] +PLUGINS = [i18n(), "pelidoc", "md-metayaml", "render_math", "series", "subcategory", "tag_cloud", "tipue_search", "pelican-css"] #PLUGINS = ["better_tables", "just_table"] +PDF_PROCESSOR = True + +PANDOC_OUTPUTS = { + 'pdf': 'pdf', +} + +PANDOC_EXTRA_OPTIONS = [ + "--toc", + "-V", "toc-title:Содержание", + "-F", "skip-toc-tag", + "--template=wiki", + "--pdf-engine=xelatex" +] + +PANDOC_MARKDOWN_EXTENSIONS = [ + "+smart" +] + #YUICOMPRESSOR_EXECUTABLE = "yui-compressor" #PLUGINS += ["yuicompressor"]