hugosoucycc

[ARCHIVED] Another old source code of <hugo.soucy.cc>.
Log | Files | Refs | Submodules

commit 9ab3ea9f9a3955b381bebae47b7f058547f5e985
parent 4abdbd534aaa0a7724a7ae8c489215022545011b
Author: Hugo Soucy <hugo.soucy@savoirfairelinux.com>
Date:   Thu, 29 Jun 2017 13:45:40 -0400

create a config for the markdown converter.

Diffstat:
Mconfig/app.cfg | 4++++
Mfunctions/make-html-from-md | 11++++++-----
2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/config/app.cfg b/config/app.cfg @@ -50,3 +50,7 @@ export TMP_PATH="/tmp/fakestache" # Base URL export BASE_URL=$SITE_URL + +# Markdown Converter +export MARKDOWN_CONVERTER="$FAKESTACHE_PATH/lib/markdown/Markdown.pl" +# export MARKDOWN_CONVERTER="cmark" diff --git a/functions/make-html-from-md b/functions/make-html-from-md @@ -1,8 +1,9 @@ #!/usr/bin/env bash -# Create HTML files with the Markdown.pl script -make_html_from_md () { - # Maybe this should be the default and give the possibility to use - # an other command to produce HTML from markdown - "$FAKESTACHE_PATH/lib/markdown/Markdown.pl" $1 +# Create HTML files with a Markdown converter +make_html_from_md () { + "$MARKDOWN_CONVERTER" $1 } + +# By default it is Markdown.pl +# But you can change it in `config/app.cfg`