-
-
Notifications
You must be signed in to change notification settings - Fork 681
Fech data from an external app #736
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @kbrosseau We plan to add this possibility very soon. |
Hi @atinux, Great! |
One way to do this now (until it's actually a feature) is to run a node script before the build starts to (a) fetch content from one or more external endpoints, (b) save everything into your app's |
@atinux is this feature planned for v2? |
It's planned yes 😀 |
Hi all, I ran into the same problem. While @cschweda's solution only works once in the build step (I guess) I solved it by using the markdown-it library in my component directly:
|
Bump. Would love this feature! Our markdown is in a CMS for a lot of reasons and it would be awesome to use Nuxt content for the rendering and all the features that come with it. |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days. |
Just a comment to keep it open :) |
yes, please keep this open. I've solved my issue with Nuxt Content with the pre-build step I mention above, but I'd love to see some sort of configurable 'fetcher' for external content. Happy to provide an example of my pre-build code if anyone is interested. |
Are you wanting to fetch the external content during the build so that it can then be statically generated, or do you want fetching done at runtime so that the initial page can be loaded from the server, then subsequent pages can be fetched from the client? |
Doesn't really matter, right? All that matters is when the page is rendered the content is there. How it happens? Don't care. What I do now is -- as I say above -- do a pre-build process that (a) grabs the data from the cms, (b) inserts it into files in It works well -- no issues -- but I'm never sure if a pre-build step is a best-practice type-thing -- or if it's just a hack. I'm sensing it'a a hack -- and that's fine -- it works -- but I would like a more elegant option. EDIT: Btw, I use Strapi -- so it's super-easy to get the content during the pre-build. That's not the issue. The issue is if there's a way to do it directly in Nuxt Content/ |
If you're fetching content before building (i.e. While content v3 supports a remote source such as a GitHub repository, again, as a fully-static, pre-rendered site, there is another more custom solution you could set up assuming the following:
You'll need to account for loading and error states, etc. and ensure you install If you configure your app to render via SSR, you can do an extra step and configure |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days. |
This issue was closed because it has been stalled for 30 days with no activity. |
Hello everyone,
We use nuxt content for our content management. And we have to build another app in a new repo, but we have to fetch content of our first app. Is is possible to open an endpoint in production? Or maybe possible to achieve that with another cms git?
Hope that we are not blocked now with that... :(
Thanks for your help,
Kevin
The text was updated successfully, but these errors were encountered: