Our great sponsors
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
Definitely possible! I’m doing the same thing but with Gatsby instead. Gatsby happened to have a plugin that did the heavy lifting of going out and getting data from the YouTube API, so I used that. If you want to see what my codebase looks like: https://github.com/ashleykolodziej/gatsby-starter-netlify-cms Keep in mind Gatsby’s templating system is in React, so some things you may see there like useEffect won’t apply to Hugo. (I did my last site in Hugo and honestly I’m liking Gatsby better.)
If you don’t have experience with those things, I have an Idea Generator tutorial playlist that goes through how to do all that step by step with the raindrop.io API. Pulling data from YouTube will be similar. Here’s the basic code for that: https://github.com/ProfessorKolodziej/idea-generator/blob/develop/src/js/scripts.js#L68
The other option would be to use YouTube’s official JavaScript library: https://github.com/google/google-api-javascript-client This might be easier, and has more complete guides on how to pull data. Try both and see what works!