bin/plaintext.sh: Append redirect rule to _redirects Signed-off-by: Anirudh Oppiliappan <x@icyphox.sh>
Anirudh Oppiliappan x@icyphox.sh
Wed, 19 Feb 2020 19:18:44 +0530
2 files changed,
27 insertions(+),
1 deletions(-)
M
_redirects
→
_redirects
@@ -1,1 +1,24 @@
http://icyphox.netlify.com/* http://icyphox.sh/:splat 301! +/txt/2019-09-17.txt /txt/2019-09-17 +/txt/2019-09-27.txt /txt/2019-09-27 +/txt/2019-10-17.txt /txt/2019-10-17 +/txt/2019-11-16.txt /txt/2019-11-16 +/txt/2019-in-review.txt /txt/2019-in-review +/txt/2020-01-18.txt /txt/2020-01-18 +/txt/digital-minimalism.txt /txt/digital-minimalism +/txt/disinfo.txt /txt/disinfo +/txt/fb50.txt /txt/fb50 +/txt/five-days-tty.txt /txt/five-days-tty +/txt/hacky-scripts.txt /txt/hacky-scripts +/txt/ig-opsec.txt /txt/ig-opsec +/txt/intel-conundrum.txt /txt/intel-conundrum +/txt/irc-for-dms.txt /txt/irc-for-dms +/txt/mailserver.txt /txt/mailserver +/txt/mnml-browsing.txt /txt/mnml-browsing +/txt/my-setup.txt /txt/my-setup +/txt/prosody.txt /txt/prosody +/txt/pycon-wrap-up.txt /txt/pycon-wrap-up +/txt/python-for-re-1.txt /txt/python-for-re-1 +/txt/rop-on-arm.txt /txt/rop-on-arm +/txt/ru-vs-gb.txt /txt/ru-vs-gb +/txt/save-org.txt /txt/save-org
M
bin/plaintext.sh
→
bin/plaintext.sh
@@ -11,8 +11,11 @@ }
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/${base%.*}.txt" + "$p" -o "pages/txt/$no_ext.txt" + printf '%s\n' "/txt/$no_ext.txt /txt/$no_ext" >> _redirects } done +