Great template, but limitations with SSR and dynamic content handling #346
Replies: 5 comments
-
Encountered the same problem. I didn't even think this template may not support SSR. Spent days building my site and then whops, SSR is no supported and no easy way to patch things up. Should be written more clearly somewhere. |
Beta Was this translation helpful? Give feedback.
-
Hi @AndresBarretoDev and @SamuelAierizer It is true that this template does not support SSR and was not explicitly declared in the README. We have already added it: https://github.com/onwidget/astrowind/blob/main/README.md#getting-started @AndresBarretoDev, we have connected the template AstroWind to different CMS in several projects but by rewriting the https://github.com/onwidget/astrowind/blob/main/src/utils/blog.ts We're organizing that code a bit to include in future versions of AstroWind, as well as SSR support. |
Beta Was this translation helpful? Give feedback.
-
For those who need a quick fix for this, i was able to get around it by converting my .yaml file to a json and have something like this:
This kind of defeats the purpose but from what I can tell until now, it was a somewhat working patch. With this change I was able to deploy to vercel and use SSR. From what I understood it is a very bad practice to open files like this when you have SSR and a better workaround would be to make the config file available via a GET route and then make a request to the config file and process it from there. I don't know how this would impact the theme as a whole, maybe there is a better way to solve this. Don't get me wrong I love your work and I think it's one of the best out there. Was just surprised when I encountered this issue. |
Beta Was this translation helpful? Give feedback.
-
I agree that the |
Beta Was this translation helpful? Give feedback.
-
Hi @AndresBarretoDev and @SamuelAierizer We have made some changes to process If you can take a look and see if that works for you. PS: The integration will also help us in the AstroWind 2.0 version to encapsulate all the useful components and functions that support the template and do not depend on the particular needs, content and UI of use by each user. We have always had a problem with how to update the template. One path will be that, and AstroWind integration + a cli command to generate Widgets and Components or update them. |
Beta Was this translation helpful? Give feedback.
-
Hello everyone,
I wanted to express my admiration for this template; it has many great features. However, I've encountered a significant issue: it seems not to work for SSR (Server-Side Rendering). I tried handling dynamic content from a CMS, but unfortunately, this proved to be impossible.
Despite attempting to use it in Hybrid or Server mode, I consistently ran into errors. During the build process, it appears to add code from the config.ts file, resulting in it not functioning properly in production.
In summary, the template is excellent for static content, but for those of us who need to manage dynamic content and utilize SSR, it may not be the best choice. I would appreciate any guidance or solutions you can provide to overcome this obstacle.
Thank you!
This is an example of compilation. However, when compiling in this way and deploying it to Vercel, it throws errors such as:
And this error is due to the fact that, understandably, during the compilation, there is a file with this embedded code.
Beta Was this translation helpful? Give feedback.
All reactions