Note from 3 June 2022
Looks like the nasty bot finally stopped smashing my photography site! 🎉
-
older note:
Note from 27 May 2022 -
newer note:
Note from 4 June 2022
Looks like the nasty bot finally stopped smashing my photography site! 🎉
I still don't understand why using Cloudflare in front of Netlify allows for a much better and stable Time To First Byte (TTFB) than Cloudflare Pages or Netlify alone… 🤷♂️
TTFB for static sites should always be very low.
TIL AVIF transformation is only available on #Cloudflare for images below 2 megapixels… 😭
https://community.cloudflare.com/t/avif-size-limit/273724/5
We need JPEG XL! 🙏
Updating webmentions on a static site
When I started using Webmention on this site (more than 5 years ago!), I was building the site on my local computer, and uploading the build result on my hosting with rsync
. I've moved to Cloudflare Pages 6 months ago, which means webmentions where updated only when I pushed new content to GitHub. Here's how I fixed that.
To have different builds for #Cloudflare Pages previews, I found if-env
and the CF_PAGES_BRANCH
variable:
{
"scripts": {
"build": "if-env CF_PAGES_BRANCH=main && npm run main || npm run preview"
}
}
If you want to run a #GitHub Action after a #Cloudflare Pages build is done, you can use @WalshyDev's Action: https://github.com/marketplace/actions/cloudflare-pages-await
I hope Cloudflare Pages will get triggers like #Netlify: https://docs.netlify.com/functions/trigger-on-events/