Add external markup render support (#2570)

* add external markup render support

* bug fixed

* refacotr codes and fix wrong error log

* fix comments and add check to prevent leaks

* add check for config file and improve the example

* check file close error

* use ioutil.TempFile instead uuid

* correct Render -> Parser

* improve warning when incorrect markup setting

* fix typos
This commit is contained in:
Lunny Xiao 2017-11-07 14:33:06 +08:00 committed by Lauris BH
parent ddb75191ec
commit 62d0a4d882
4 changed files with 149 additions and 1 deletions

9
conf/app.ini vendored
View file

@ -573,3 +573,12 @@ SHOW_FOOTER_BRANDING = false
SHOW_FOOTER_VERSION = true
; Show time of template execution in the footer
SHOW_FOOTER_TEMPLATE_LOAD_TIME = true
[markup.asciidoc]
ENABLED = false
; List of file extensions that should be rendered by an external command
FILE_EXTENSIONS = .adoc,.asciidoc
; External command to render all matching extensions
RENDER_COMMAND = "asciidoc --out-file=- -"
; Input is not a standard input but a file
IS_INPUT_FILE = false