Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update non-challenge video thumbnails + automation script #1646

Closed

Conversation

fturmel
Copy link
Collaborator

@fturmel fturmel commented Jul 5, 2024

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.jpg

NOTE: 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.

Copy link

netlify bot commented Jul 5, 2024

Deploy Preview for codingtrain ready!

Name Link
🔨 Latest commit 7945905
🔍 Latest deploy log https://app.netlify.com/sites/codingtrain/deploys/668a9aa62311680008fac48d
😎 Deploy Preview https://deploy-preview-1646--codingtrain.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@shiffman
Copy link
Member

shiffman commented Jul 6, 2024

Ah, this script is so great, thank you @fturmel! Should I merge or are we still discussing / thinking as per #1645?

@fturmel
Copy link
Collaborator Author

fturmel commented Jul 6, 2024

Your call, we've outlined the options in the issue discussion. I don't mind if we close this PR in favor of using the track thumbnail for all non-challenge videos if that's a better fit.

Having thumbnails for each video is not a bad thing though. Given that the individual videos are substantial, the intent when sharing a link is most likely to reference the video and not necessarily the parent track.

…nce `sddefault` is actually higher res than `hqdefault`
…l/thecodingtrain.com into PR/non-challenge-video-thumbnails
@fturmel
Copy link
Collaborator Author

fturmel commented Jul 8, 2024

Closing in favor of #1648

@fturmel fturmel closed this Jul 8, 2024
@fturmel fturmel deleted the PR/non-challenge-video-thumbnails branch July 8, 2024 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nature of Code track video preview images
2 participants