bin/plaintext.sh: Redirects lol. Just rename it. Signed-off-by: Anirudh Oppiliappan <x@icyphox.sh>
Anirudh Oppiliappan x@icyphox.sh
Wed, 19 Feb 2020 19:47:26 +0530
25 files changed,
4 insertions(+),
3 deletions(-)
jump to
M
bin/plaintext.sh
→
bin/plaintext.sh
@@ -9,15 +9,15 @@ dir=${dir%"$2"}
base="${dir:-/}" } -# prepare the '_redirects' file -printf 'http://icyphox.netlify.com/* http://icyphox.sh/:splat 301!\n' > build/_redirects for p in pages/blog/*.md; do basename "$p" no_ext="${base%.*}" [ "$base" != "_index.md" ] && { pandoc --quiet -s -f "markdown+gutenberg" \ "$p" -o "pages/txt/$no_ext.txt" - printf '%s\n' "/txt/$no_ext.txt /txt/$no_ext 301" >> build/_redirects + # we have to 'mv' each file because of how pandoc treats + # output to plaintext. it's weird. + mv "pages/txt/$no_ext.txt" "pages/txt/$no_ext" } done