diff options
Diffstat (limited to 'bin/func')
-rw-r--r-- | bin/func | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -145,6 +145,10 @@ __lowdown() { lowdown --html-no-skiphtml --html-no-escapehtml "${1}" } +__generate_rss_body() { + lowdown -tgemini "${1}" | sed 's/&/\&/g; s/</\</g; s/>/\>/g; s/"/\"/g; s/'"'"'/\'/g' +} + __apply_template() { # 1: template name or default m4 "templates/${1:-default}" @@ -223,14 +227,14 @@ __handle_md() { __generate_metadata "${1}" > "${tmp_file}.metadata" - if [ ! "$(__get_value ${1} index)" = "" ]; then + if [ ! "$(__get_value "${1}" index)" = "" ]; then __generate_index "${1}" > "${tmp_file}.index" else [ -f "${tmp_file}.index" ] && rm "${tmp_file}.index" fi - __apply_template "$(__get_value ${1} template)" > "${tmp_file}" - __install "${tmp_file}" "$(__get_out_filename ${1})" + __apply_template "$(__get_value "${1}" template)" > "${tmp_file}" + __install "${tmp_file}" "$(__get_out_filename "${1}")" } __handle() { |