Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 task done
abiriadev opened this issue Jun 9, 2024 · 0 comments
Open
1 task done

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

abiriadev opened this issue Jun 9, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@abiriadev
Copy link
Owner

abiriadev commented Jun 9, 2024

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

@abiriadev abiriadev added the enhancement New feature or request label Jun 9, 2024
@abiriadev abiriadev self-assigned this Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

1 participant