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
This commit is contained in:
parent
d62b5b6387
commit
f220748dd4
@ -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
|
||||
|
||||
|
||||
|
12
ssg5
12
ssg5
@ -1,4 +1,4 @@
|
||||
#!/usr/pkg/bin/bash
|
||||
!/usr/pkg/bin/bash
|
||||
# Pete Dussin <peteyboy@sdf.org> (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
|
||||
|
Loading…
Reference in New Issue
Block a user