question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fetch content from external sources

See original GitHub issue

Is your feature request related to a problem? Please describe.

I’ve got some articles in a database which can be accessed by a REST API. It would be great to access these articles from Nuxt Content.

Describe the solution you’d like

For example: const { title } = await this.$content('https://some-api/article-1').only(['title']).fetch()

Describe alternatives you’ve considered

Instead of accessing them like above. Download markdown files to the content directory and access them in the regular way.

Thanks for all the hard work and the awesome new features!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:21
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

8reactions
benjamincanaccommented, May 25, 2020

Hey @janekkkk,

Nuxt Content parses markdown files on the file system on load and builds an API around the database generated from the content directory, it cannot be used on eternal sources.

You’re alternative seems the way to go.

6reactions
sillvvacommented, Apr 5, 2021

I also would like to be able to host my markdown files in Firebase Cloud Storage and fetch them at runtime via an API. I already figured out hot to dynamically generate the routes. The only thing I haven’t figured out is how to parse the markdown into the <nuxt-content> tag. Some of my markdown files have vue components in them, so a 3rd party API isn’t a feasible option for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fetching data from the server - Learn web development | MDN
This article shows how to start working with Fetch to fetch data from the server.
Read more >
Fetching data from external API | OutSystems
I'm using Reactive Outsystems. I wanted to ask about fetching Data from external source (API). I followed this tutorial: https://success.
Read more >
Problem with fetching from external source - Stack Overflow
The best you can do is to proxy the URL through your own server. Create an endpoint on your own server that proxies...
Read more >
GET data from external REST API & display with HTML/CSS ...
Learn how to fetch data from external REST API and using DOM manipulations, create HTML elements on the fly and display the data...
Read more >
Use Microsoft Query to retrieve external data
You can use Microsoft Query to retrieve data from external sources.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found