fix the index generation
This commit is contained in:
parent
7e06ce4057
commit
286cd850e8
|
@ -2,6 +2,9 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
cd /tmp
|
||||||
|
wget http://www.frykholm.se/files/markdown.lua
|
||||||
|
|
||||||
cd /app/src/blog
|
cd /app/src/blog
|
||||||
|
|
||||||
IFS='
|
IFS='
|
||||||
|
@ -10,9 +13,9 @@ IFS='
|
||||||
for file in $(ls -t)
|
for file in $(ls -t)
|
||||||
do
|
do
|
||||||
title=$(head -n1 $file)
|
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}')
|
linkname=$(echo $file | awk -F "." '{print $1}')
|
||||||
|
|
||||||
echo '<div class="post"><h2>'"$title"'</h2><p>'"$line"'...</p><a href="/blog/'"$linkname"'">Read More</a></div>' >> /app/src/static/markdown/blog.html
|
echo '<div class="post"><h2>'"$title"'</h2>'"$line"'<a href="/blog/'"$linkname"'">Read More</a></div>' >> /app/src/static/markdown/blog.html
|
||||||
echo "generated info for $file"
|
echo "generated info for $file"
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue