From 52b67951f1e8a7f1af9b85d4ae8e7689d194574a Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 3 Aug 2015 17:43:40 +0200 Subject: Working prototype in hakyll --- lists/default.md.do | 41 ----------------------------------------- lists/dirty-haskell/001 | 1 - lists/dirty-haskell/002 | 1 - lists/dirty-haskell/title | 1 - lists/zz_all/001 | 1 - lists/zz_all/002 | 1 - lists/zz_all/003 | 1 - lists/zz_all/title | 1 - 8 files changed, 48 deletions(-) delete mode 100644 lists/default.md.do delete mode 120000 lists/dirty-haskell/001 delete mode 120000 lists/dirty-haskell/002 delete mode 100644 lists/dirty-haskell/title delete mode 120000 lists/zz_all/001 delete mode 120000 lists/zz_all/002 delete mode 120000 lists/zz_all/003 delete mode 100644 lists/zz_all/title (limited to 'lists') diff --git a/lists/default.md.do b/lists/default.md.do deleted file mode 100644 index 55abe6f..0000000 --- a/lists/default.md.do +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env bash -redo-ifchange "$2/title" - -POSTS=() -while read -r -d $'\0'; do - post=$(realpath --relative-to=. "$REPLY") - POSTS+=("$post") -done < <(find "$2" -maxdepth 1 -mindepth 1 -not -name 'title' -not -name 'preview' -print0 | sort -z) - -for x in "${POSTS[@]}"; do - printf "%s\0%s\0" "$x" "${x%.md}.html" -done | xargs -r -0 redo-ifchange - -TITLE=$(< $2/title) - -cat <"$2/preview" -prev_no=3 -if [[ ${#POSTS[@]} -gt $prev_no ]]; then - 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" -done diff --git a/lists/dirty-haskell/001 b/lists/dirty-haskell/001 deleted file mode 120000 index 92c240d..0000000 --- a/lists/dirty-haskell/001 +++ /dev/null @@ -1 +0,0 @@ -../../posts/blog-documentation.md \ No newline at end of file diff --git a/lists/dirty-haskell/002 b/lists/dirty-haskell/002 deleted file mode 120000 index ed24126..0000000 --- a/lists/dirty-haskell/002 +++ /dev/null @@ -1 +0,0 @@ -../../posts/blog-rss.md \ No newline at end of file diff --git a/lists/dirty-haskell/title b/lists/dirty-haskell/title deleted file mode 100644 index e40f49c..0000000 --- a/lists/dirty-haskell/title +++ /dev/null @@ -1 +0,0 @@ -Blog Software diff --git a/lists/zz_all/001 b/lists/zz_all/001 deleted file mode 120000 index 92c240d..0000000 --- a/lists/zz_all/001 +++ /dev/null @@ -1 +0,0 @@ -../../posts/blog-documentation.md \ No newline at end of file diff --git a/lists/zz_all/002 b/lists/zz_all/002 deleted file mode 120000 index ed24126..0000000 --- a/lists/zz_all/002 +++ /dev/null @@ -1 +0,0 @@ -../../posts/blog-rss.md \ No newline at end of file diff --git a/lists/zz_all/003 b/lists/zz_all/003 deleted file mode 120000 index 1057f2c..0000000 --- a/lists/zz_all/003 +++ /dev/null @@ -1 +0,0 @@ -../../posts/pwutil.md \ No newline at end of file diff --git a/lists/zz_all/title b/lists/zz_all/title deleted file mode 100644 index 73a5267..0000000 --- a/lists/zz_all/title +++ /dev/null @@ -1 +0,0 @@ -All Posts -- cgit v1.2.3