From f220748dd497919ea12f9a0ecd77ba8d5b620826 Mon Sep 17 00:00:00 2001 From: Pete Dussin Date: Fri, 11 Jun 2021 00:01:53 +0000 Subject: [PATCH] Updated the function render_md_files_lowdown() because lowdown apparently changed its flags (copied the changes from 'ssg6' from https://rgz.ee/bin/ssg6). Updated README.md because rgz's old website address no longer works, and changed text because Markdown.pl should be installed now on SDF. Changes to be committed: modified: README.md modified: ssg5 --- README.md | 8 ++------ ssg5 | 12 ++++++------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 849c105..66c880b 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,8 @@ # ssg-for-sdf I just started messing around as part of looking for a way to make -contributing to tutorials easier, and got as far as using 'ssg', from [[https://www.romanzolotarev.com/ssg.html]], which was recommended as a markdown-converting static site generator on another board -here. +contributing to tutorials easier, and got as far as using 'ssg5', from [[https://rgz.ee/ssg.html]], which was recommended as a markdown-converting static site generator on another board here. -I had problems with Markdown.pl not working (I posted to REQUESTS, somehow -the perl Text:Markdown isn't working), but I used cpanm and installed that -library locally*, and then ssg worked! +I had problems with Markdown.pl not working but I posted to REQUESTS, and they added it (but at the time I used cpanm and installed that library locally*, and then ssg worked!) Because I didn't like how it silently would fail on the markdown problem, so I added a little pipeline-tracing with the bash 'caller' command (I @@ -23,4 +20,3 @@ It's cool, it processes markdown first then HTML, so existing HTML files are unt echo 'export MANPATH=$HOME/perl5/man:$MANPATH' >> ~/.profile cpanm Text::Markdown - diff --git a/ssg5 b/ssg5 index 8f133d2..37e858d 100755 --- a/ssg5 +++ b/ssg5 @@ -1,4 +1,4 @@ -#!/usr/pkg/bin/bash +!/usr/pkg/bin/bash # Pete Dussin (6/27/20): using sh -e didn't work, but it ran without -e (exit on error) # instead of that, I looked online and found some error handling lines # that return a stack trace, but 'caller' is only in bash, so I'm running @@ -196,15 +196,15 @@ render_md_files_lowdown() { while read -r f do lowdown \ - -D html-skiphtml \ - -d metadata \ - -d autolink < "$1/$f" | + --html-no-escapehtml \ + --html-no-skiphtml \ + --parse-no-metadata \ + --parse-no-autolink <"$1/$f" | render_html_file "$3" \ - > "$2/${f%\.md}.html" + >"$2/${f%\.md}.html" done } - render_md_files_Markdown_pl() { while read -r f do