DEV Community

Discussion on: Embed dev.to posts into your own website

 
nunogois profile image
Nuno Góis

Hmm, if that's the case I guess you can always fetch everything at once (loop through the articles and fetch their respective information) - That way you would end up with the complete dataset at the start/build time.

You can also check the API docs - Maybe there's a solution for your specific use case where the article info is expanded.

Like I said I'm not familiar with Astro yet, but it feels like it should have a solution for this specific use-case. These resources might help:

Thread Thread
 
psypher1 profile image
James 'Dante' Midzi

Thank you for this...

It's not the dynamic pages that are the issue - that I can do...

The url I need is one with all posts with all the content... I'll have a dig around the docs

Thread Thread
 
psypher1 profile image
James 'Dante' Midzi

Hey @nunogois

I got it! The docs were the key... for Astro I have to use this one https://dev.to/api/articles/me/published with an API key

I can write my article now

Thread Thread
 
nunogois profile image
Nuno Góis

Great that you got it, thanks for sharing! 🙂

Thread Thread
 
psypher1 profile image
James 'Dante' Midzi

Thank you for the help