From 88ee48c053f996679983f9fdbe806f7a15b41c4d Mon Sep 17 00:00:00 2001 From: Viktor Kleen Date: Wed, 7 Jan 2015 16:42:28 +0000 Subject: Post blog architecture --- lists/default.md.do | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lists/default.md.do') diff --git a/lists/default.md.do b/lists/default.md.do index daf7453..fffd6e2 100644 --- a/lists/default.md.do +++ b/lists/default.md.do @@ -28,13 +28,14 @@ for n in $(seq 0 $((${#POSTS[@]}-1))); do printf "* [%s](%s)\n" "${POST_TITLES[$n]}" "${POSTS[$n]%.md}.html" done +>"$2/preview" prev_no=3 if [[ ${#POSTS[@]} -gt $prev_no ]]; then - printf "* …\n" > "$2/preview" + printf "* …\n" >> "$2/preview" else prev_no=${#POSTS[@]} fi for n in $(seq $prev_no -1 1); do - printf "* [%s](%s)\n" "${POST_TITLES[-$n]}" "${POSTS[-$n]%.md}.html" >"$2/preview" + printf "* [%s](%s)\n" "${POST_TITLES[-$n]}" "${POSTS[-$n]%.md}.html" >>"$2/preview" done -- cgit v1.2.3