Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Title and Meta tagsΒ #872

@Zn4rK

Description

@Zn4rK

Hi there! πŸ‘‹

First of all β€” fantastic work on this project! It fits my needs incredibly well. πŸ™Œ

I had a quick question about the behavior described in the Frontend Metadata guide.
From the docs, it looks like the Title and Meta components should β€œjust work” out of the box β€” but currently, they seem to only update the title and meta tags in the browser, not during server-side rendering / initial rendering.

Is that the intended behavior?
I can manually set the title via ctx and pass it up to the Document, but if the goal was for metadata to be handled automatically on the server as well, maybe the guide could mention that distinction, since it's a bit important for SEO?

For reference, here’s what the rendered HTML looks like right now:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charSet="utf-8"/>
  <meta name="viewport" content="width=device-width, initial-scale=1"/>
  <title>The title</title>
  <link rel="modulepreload" href="/src/client.tsx"/>
</head>
<body>
  <div id="root">
    <!-- omitted script tag -->
    <div id="hydrate-root">
      <title>The title specified in home</title>
    </div>
  </div>
</body>
</html>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions