output: 'export' + dynamic content. Is it possible?
Answered
Barn Owl posted this in #help-forum
Barn OwlOP
Ok, so I'm very new to Next.JS and I'm just feeling my options out here. What I got is a backend that's been built with Drupal. This backend acts as a content management system and an API. Basically it outputs the content in a JSON format, like any basic API.
Now I'd need to build a frontend for it. If I build the frontend with Next.JS and use
But is this possible? I've been through the docs, but I'm not 100% sure if it's doable or not. Thanks!
Now I'd need to build a frontend for it. If I build the frontend with Next.JS and use
output: 'export' to create a simple bundle that I can just dump to a web server, is it possible to fetch the data from the API? The trick is that the data should be kept up-to-date, so it should not be only fetched on build, but automatically "all the time". A little delay is not a problem.But is this possible? I've been through the docs, but I'm not 100% sure if it's doable or not. Thanks!
Answered by Ray
yes, it is possible with client side fetching but the content will not be seo optimized
6 Replies
@Barn Owl Ok, so I'm very new to Next.JS and I'm just feeling my options out here. What I got is a backend that's been built with Drupal. This backend acts as a content management system and an API. Basically it outputs the content in a JSON format, like any basic API.
Now I'd need to build a frontend for it. If I build the frontend with Next.JS and use `output: 'export'` to create a simple bundle that I can just dump to a web server, is it possible to fetch the data from the API? The trick is that the data should be kept up-to-date, so it should not be only fetched on build, but automatically "all the time". A little delay is not a problem.
But is this possible? I've been through the docs, but I'm not 100% sure if it's doable or not. Thanks!
yes, it is possible with client side fetching but the content will not be seo optimized
Answer
Barn OwlOP
Ah yes, that's an option of course. Have to think about it, if SEO is important in this case or not.
@Barn Owl Ah yes, that's an option of course. Have to think about it, if SEO is important in this case or not.
also, you could make a part of the page to be dynamic if possible
@Ray also, you could make a part of the page to be dynamic if possible
Barn OwlOP
True. Might be that the content that needs to be updated every now and then isn't that important SEO wise.
Thanks for the help! ðŸ‘
@Barn Owl Thanks for the help! ðŸ‘
your welcome