ljsdev-ssg

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit fc96b55a8f254a7c0e7c479a475503da62d9553c
parent 41dff66c870e73f4deed3262fade758efc0368ab
Author: Leon <leon@wp2static.com>
Date:   Tue, 20 Aug 2019 01:46:46 +0200

minify html

Diffstat:
Mgenerate-article-list.sh | 14++++++++++++++
1 file changed, 14 insertions(+), 0 deletions(-)

diff --git a/generate-article-list.sh b/generate-article-list.sh @@ -36,6 +36,20 @@ done echo "</ul>" >> dst/dev-notes.html +# minify HTML +for file in ./{dst/,dst/blog/,dst/essays/,dst/dev-notes/}*.html; +do + cat $file | tr "\n" " " > "$file.concat"; + mv "$file.concat" $file; +done + +for file in src/dev-notes/*.html; +do + article=`ls "$file" | sed 's|^src/dev-notes/||'`; + title=`head -n 1 "$file" | sed -e 's/<h1>\(.*\)<\/h1>/\1/'` + echo "<li><a href=\"dev-notes/$article\">$title</a></li>" >> dst/dev-notes.html; +done + # generate repo HTML at /src cd /var/www/ljsdevtest.ljs.dev/htdocs/src/ stagit /home/git/ljsdev-ssg.git