Skip to content

[Feat]: Way to edit header or layout #40

@abiriadev

Description

@abiriadev

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:

  1. defining raw HTML layout as a component
    (just like Next.js or Astro does).
  2. 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

  • I'm willing to actively contribute to it

Related Issues

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status
No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions