one-aalam / astro-ink

Crisp, minimal, personal blog theme for Astro
https://astro-ink.vercel.app
MIT License
556 stars 93 forks source link

Support for Youtube JSON. #21

Closed talmax1124 closed 1 year ago

talmax1124 commented 2 years ago

I'm trying to use this for the Media.

https://feed2json.org/convert?url=https%3A%2F%2Fwww.youtube.com%2Ffeeds%2Fvideos.xml%3Fchannel_id=UCofs7madAM8iVlidQEzHmBg

Any Tips?

one-aalam commented 2 years ago

Hey @talmax1124, Is https://github.com/one-aalam/astro-ink/blob/main/src/pages/media.astro#L9 not working for you when the endpoint is replaced with above url?

It should ideally work. Depending on the shape of the data you might have to change https://github.com/one-aalam/astro-ink/blob/main/src/components/MediaPreview.astro a bit for your use case.

talmax1124 commented 2 years ago

I tried doing it, I couldn't make it work. Could you give it a try if you can? @one-aalam

oneaalam commented 1 year ago

Hi @talmax1124, Astro-ink now supports Youtube JSON.

You can place your YT channel id here - https://github.com/one-aalam/astro-ink/blob/main/src/config.ts#L37 and Astro - Ink can pull in the feed and carry out the necessary transformation to render the results nicely.

Thank you for your patience.