Avoid retaking all screenshots on publish unless strictly necessary
simonw opened this issue · 6 comments
Deploy will take half an hour because it's going to need to rebuild all 450 screenshots due to an (invisible) change to the entry HTML.
Originally posted by @simonw in #81 (comment)
Changes to the content of a TIL should generate a new screenshot of that TIL.
But, right now, even the tiniest tweak to the base or entry templates (including changes that wouldn't visibly affect the shots at all) triggers a 450+ screenshot generation process.
Easiest fix: instead of incorporating the hash of the HTML templates themselves, switch to a SCREENSHOT_VERSION
constant. I can then manually change that any time I want to trigger a full re-render.
I could set the first version of that to the current hash, to avoid recalculating all 450 existing shots when I deploy this change.
If I got this right, the deploy should not recreate any screenshots.