From 286cd850e889130ebc808bb816f15d8447ade609 Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Sat, 14 Feb 2015 09:11:33 -0800 Subject: [PATCH] fix the index generation --- init/startup/00_generate_index.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/init/startup/00_generate_index.sh b/init/startup/00_generate_index.sh index afbe8f4..7a574ee 100755 --- a/init/startup/00_generate_index.sh +++ b/init/startup/00_generate_index.sh @@ -2,6 +2,9 @@ set -e +cd /tmp +wget http://www.frykholm.se/files/markdown.lua + cd /app/src/blog IFS=' @@ -10,9 +13,9 @@ IFS=' for file in $(ls -t) do title=$(head -n1 $file) - line=$(head -n4 $file | tail -n1) + line=$(head -n4 $file | tail -n1 | lua /tmp/markdown.lua -n) linkname=$(echo $file | awk -F "." '{print $1}') - echo '

'"$title"'

'"$line"'...

Read More
' >> /app/src/static/markdown/blog.html + echo '

'"$title"'

'"$line"'Read More
' >> /app/src/static/markdown/blog.html echo "generated info for $file" done