Add CloudFlare purging helper
This commit is contained in:
parent
5c6a897401
commit
b8ee6a8171
|
@ -89,3 +89,11 @@ So you want to fork this repo? Sure, here's what you need to know to whitelabel
|
||||||
- All other GitHub pages gotchas apply (CNAME, etc).
|
- All other GitHub pages gotchas apply (CNAME, etc).
|
||||||
- Edit everything in `_data/` - this holds all 'config' for the site: ad IDs, strings, etc.
|
- Edit everything in `_data/` - this holds all 'config' for the site: ad IDs, strings, etc.
|
||||||
- Edit `_config.yml` as well, lots of things may not apply to you.
|
- Edit `_config.yml` as well, lots of things may not apply to you.
|
||||||
|
|
||||||
|
## CloudFlare purging
|
||||||
|
|
||||||
|
The site devhints.io is backed by CloudFlare. Updates will take 2 days to propagate to the website by default. To make sure recent changes will propagate, use this helper script. It will give instructions on how manual selective cache purging can be done.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./_support/cf-purge.sh
|
||||||
|
```
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# Helper to copy the latest cheatsheets to the clipboard for CloudFlare
|
||||||
|
# purging. This ensures visitors will see new versions.
|
||||||
|
|
||||||
|
(
|
||||||
|
git log "master@{3 days ago}..HEAD" --pretty="" --name-only \
|
||||||
|
| grep -E '\.md$' \
|
||||||
|
| grep -v -E 'CONTRIBUTING|README|Readme' \
|
||||||
|
| grep -v -E '^_' \
|
||||||
|
| sort \
|
||||||
|
| uniq \
|
||||||
|
| sed 's/\.md$//g'
|
||||||
|
) \
|
||||||
|
| sed 's#^#https://devhints.io/#g' \
|
||||||
|
| xargs echo https://devhints.io/ \
|
||||||
|
| pbcopy
|
||||||
|
|
||||||
|
echo "Copied to clipboard."
|
||||||
|
echo "Purge it here:"
|
||||||
|
echo ""
|
||||||
|
echo " https://www.cloudflare.com/a/caching/devhints.io"
|
||||||
|
echo ""
|
||||||
|
echo "Then click 'Purge Individual Files'"
|
Loading…
Reference in New Issue