Update non-challenge video thumbnails + automation script #1646
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
closes #1645
The automation script deletes previous images for non-challenge videos, then downloads the highest resolution available thumbnail on the YouTube CDN. I'm adding it here for convenience in case we ever need to run it again.
The video referenced in the issue:
https://deploy-preview-1646--codingtrain.netlify.app/tracks/the-nature-of-code-2/noc/1-vectors/2-vector-math
new
og:image
: https://deploy-preview-1646--codingtrain.netlify.app/static/4fc1c112a501241314df4480643e5289/4a49b/index.jpgNOTE: you can't test the
og:image
directly from the preview URL unfortunately because the production domain is hard-coded in the absolute URL. There are environment variables we could use to determine the correct URL for every deployment, but I don't think it's worth fixing because preview builds will end up generating different HTML for every page and invalidate the build/deploy caches.