Skip to content

Best way to create dynamic pages from third party content (Medium) #4334

@Kaisaurus

Description

@Kaisaurus

Description

I want a website to show medium blog posts and have individual pages for each post.
Is this possible with Gatsby without having to do a re-build every time there is a new post?
If its possible, what would be the approach to this? (I am a bit of a gatsby noob so a detail to the approach would be greatly appreciated)

Environment

Gatsby version: 1.9.213
Node.js version: 8.9.4

At the moment I am getting all medium post with this code:

async function getMediumFeed(username = '@kaigotoh') {
  const mediumUrl = `https://medium.com/feed/${username}`
  const resp = await fetch(
    `https://api.rss2json.com/v1/api.json?rss_url=${mediumUrl}`
  )
  return await resp.json()
}

and calling the function like this

const mediumContent = getMediumFeed()
    .then(data => console.log(data))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions