











In Quick Tip #007 we talked about migrating away from using a Client-side third-party JavaScript widget to display GitHub stargazer counts and towards a Data fetched at Build time approach.
Updating this data at build time means that the data isn’t necessarily “live” (although the counts are likely cached at by at least one of the upstream dependencies of this widget, with a frequency that is out of your control).
I’m comfortable with these numbers being a little delayed (more than the JS widget method was) and with this new approach I get more control over the frequency of updates BUT I do probably want to run the build at least once a day. To do this, I used an IFTTT applet to trigger my Netlify build to run every morning using Netlify’s Build Hooks.
Many other services also provide build hooks and/or scheduled builds!
Heavily inspired by Phil Hawksworth’s work on RSS Jamstack.
Build & Deploy settingsContinuous DeploymentBuild hookDeploy every day (or whatever you’d like)main branch for my site.https://api.netlify.com/build_hooks/SOME_ID_HERE. This is the URL you want.Here are a few options to trigger your build hook:
New Applet on ifttt.com+thisDate & Time serviceEvery day at option (or whatever frequency you’d like)+thatWebhooks serviceMake a web request optionPOST.application/x-www-form-urlencoded.{}.Create action button.Finish.此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。