ljsdev-ssg

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

commit fbfc0474ec49976e4e9027dc3db704ed97a6dae9
parent fb52fd2f5205b3d44438cbdb142f9c9aa2ce333d
Author: Leon <leon@wp2static.com>
Date:   Mon, 19 Aug 2019 09:41:50 +0200

build blog index

Diffstat:
Mgenerate-article-list.sh | 10+++++-----
Asrc/blog.html | 4++++
Msrc/index.html | 1-
3 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/generate-article-list.sh b/generate-article-list.sh @@ -1,12 +1,12 @@ #!/bin/sh -echo "<ul>" >> dst/index.html +echo "<ul>" >> dst/blog.html -for file in src/*.html; +for file in src/blog/*.html; do - article=`ls "$file" | sed 's|^src/||'`; + article=`ls "$file" | sed 's|^src/blog/||'`; title=`head -n 1 "$file" | sed -e 's/<h1>\(.*\)<\/h1>/\1/'` - echo "<li><a href=\"$article\">$title</a></li>" >> dst/index.html; + echo "<li><a href=\"$article\">$title</a></li>" >> dst/blog.html; done -echo "</ul>" >> dst/index.html +echo "</ul>" >> dst/blog.html diff --git a/src/blog.html b/src/blog.html @@ -0,0 +1,4 @@ +<h1>Blog posts from across the years</h1> + +<h2>There's no deleting things on the internet!</h2> + diff --git a/src/index.html b/src/index.html @@ -47,5 +47,4 @@ <p>To Roman Zolotarev, for helping us Master the Web. My family and friends, for enduring my voluntary financial hardship while pursuing my passions. Every contributor to open source.</p> -<h3>Blogs/Articles/Notes from across the years</h3>