Problem
Currently, Seia has a hardcoded html template:
|
return c.html( |
|
<html> |
|
<head> |
|
<meta charSet="utf-8" /> |
|
<meta |
|
name="viewport" |
|
content="width=device-width, initial-scale=1.0" |
|
/> |
|
<title>Seia SSR</title> |
|
<link rel="stylesheet" href="/@seia/style.css" /> |
|
<script type="module" src="/@seia/client.js" /> |
|
</head> |
|
<body> |
|
<div |
|
id="root" |
|
dangerouslySetInnerHTML={{ |
|
__html, |
|
}} |
|
/> |
|
<script |
|
dangerouslySetInnerHTML={{ |
|
__html: injectGlobal(rscPayload), |
|
}} |
|
/> |
|
</body> |
|
</html>, |
|
) |
With this, the user can't change <title>, add custom <link>s, edit <meta>s, etc.
Suggestion
Seia should support one of the following:
- defining raw HTML layout as a component
(just like Next.js or Astro does).
- reading the user's
index.html file from the project root
(just like Vite).
Also, we should test that existing libraries like React Helmet work correctly with Seia RSC & SSR.
Willingness to Contribute
Related Issues
No response
Problem
Currently, Seia has a hardcoded html template:
seia/packages/seia/src/server.tsx
Lines 58 to 84 in 04ba632
With this, the user can't change
<title>, add custom<link>s, edit<meta>s, etc.Suggestion
Seia should support one of the following:
(just like Next.js or Astro does).
index.htmlfile from the project root(just like Vite).
Also, we should test that existing libraries like React Helmet work correctly with Seia RSC & SSR.
Willingness to Contribute
Related Issues
No response