all repos — site @ f2366b039f93cea2c4ad42e47fd47ecc38116a1e

source for my site, found at icyphox.sh

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
commit

f2366b039f93cea2c4ad42e47fd47ecc38116a1e

parent

96e7f1a23be53f6cdc8b9ecf353794f2f9f9c494

M bin/plaintext.shbin/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
A pages/_redirects

@@ -0,0 +1,1 @@

+http://icyphox.netlify.com/* http://icyphox.sh/:splat 301!