Changeset View
Changeset View
Standalone View
Standalone View
scripts/fetch-blog-feed.sh
#!/bin/bash | #!/bin/bash | ||||
# This script downloads the static JSON for the blog feed in order to improve SEO. | # This script downloads the static JSON for the blog feed in order to improve SEO. | ||||
TOPLEVEL=$(git rev-parse --show-toplevel) | TOPLEVEL=$(git rev-parse --show-toplevel) | ||||
cd "${TOPLEVEL}"/_data | cd "${TOPLEVEL}"/_data | ||||
wget -O blog-feed.json https://blog.bitcoinabc.org/json/ | wget -O blog-feed.json https://blog.bitcoinabc.org/json/ | ||||
# HTML-escape unicode characters because Jekyll complains about them despite | # HTML-escape unicode characters because Jekyll complains about them despite | ||||
# these characters being within strings. | # these characters being within strings. | ||||
sed -i 's/\\\(u[a-z0-9]\{4\}\)/\&#x\1;/g' blog-feed.json | sed -i 's/\\u\([a-z0-9]\{4\}\)/\&#x\1;/g' blog-feed.json |