Closed KonradUdoHannes closed 12 months ago
Part of #100
I moved the membership application to a dump folder temporarily as this is not a prio right now 37ea5c4
with "works extremely poorly", do you mean that one only gets file not found errors etc.?
renamed files in b9c320a
I think the proper way to test the static build is by running
npm run preview
I tested deploying the static website here: https://correlaid-test.onrender.com/
There is a pattern behind what is not working currently:
layout.server.js only seems to work on the german home ssr for podcast, blog, events collections etc. works
Maybe this is connected to the way layout.svelte works. It seems to render only the slot most of the time and not the other components. This also explains the wrong layout for pages like: https://correlaid-test.onrender.com/blog/
Made some improvements here with #197, which fixed prerendering of blogpost routes, and #198 which made path lookup for data rendering agnostic wrt. the trailingSlash
configuration. This seems to fix most if not all the issues, at least there were no apparent issues to me at the moment.
@jstet If you find more issues with the static site please post them here as well. If we don't find anything directly, we should consider closing this issue and treating potential later issues separately.
The static site seems to work now doesnt it? Can we close this issue?
Probably. I basically wanted to leave it open until the end of today or tomorrow to see whether anything major comes up from other people that are testing/having a look. If nobody stumbles upon anything immediately, I'll close this issue and treat future bugs as separate issues.
As no major issues came up this is considered done, and future bugs will be treated as separate issues.
Currently the static build is possible under certain conditions, but the static website works extremely poorly. Routes should be refactored to improve upon this. The primary change will be to move data fetching from client side files to server side files (that then get prerendered with the data). This means for instance moving data fetching from +layout.js to +layout.server.js
Its possible that other modifications have to be made to get the static site fully functioning. And this issue should be used to document these requirements. The task can then possibly be done as sub issues.
How to build the static site
in the
.env
file setPRERENDER=ALL
andADAPTER=STATIC
as long as #182 is not closed, temporarily remove the membership application component (don't commit this)
rm -rf src/routes/[[locale=locale]]/community/[become_member=become_member]/[membership_application=membership_application]/
launch the side from the
index.html
from thebuild/
directory