RFC: Migrate content to be rendered only on the server/at build time #1150
brandonroberts
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
How would this affect Use-case: SSG for landing page, terms, privacy, blog, etc, and SPA for everything else. No explicit SSR/hydration cases. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, the
@analog/content
package is what we use to render markdown routes and content pages. This takes advantage of libraries like Prism, marked, and support for Shiki recently added by @nartc.The advantage of this approach is consistently between the two environments and uses Angular's upstream APIs.
The disadvantage of this approach is we're rendering the content twice, during prerendering, and again during client hydration. This is fine for packages like prismjs which works in both environments, but is constrained with tools like shiki where all the highlighting is expected to be done server-side only.
This proposal moves the rendering pipeline to be done only during server rendering and build time. During client hydration, we would only be consuming rendered content.
Advantages
Beta Was this translation helpful? Give feedback.
All reactions