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

[Feature Request] I really miss Helmet's titleTemplate #16

Closed
nathan-alden-sr opened this issue Aug 31, 2022 · 1 comment
Closed

[Feature Request] I really miss Helmet's titleTemplate #16

nathan-alden-sr opened this issue Aug 31, 2022 · 1 comment

Comments

@nathan-alden-sr
Copy link

I'm in the process of migrating my app from React to SolidJS. One thing that seems to be lacking in <Title> is the ability to do what Helmet does in react-helmet-async:

App.tsx:

const defaultTitle = "My Site";
...
return (
  <HelmetProvider>
    <Helmet titleTemplate={`%s - ${defaultTitle}`} defaultTitle={defaultTitle} />
    <MyPage />
  </HelmetProvider>
);

MyPage.tsx:

return (
  <Helmet title="My Page" />
)

This code replaces the existing <title> tag with <title>My Page - My Site</title>.

@nathan-alden-sr nathan-alden-sr changed the title [Feature request] I really miss Helmet's titleTemplate [Feature Request] I really miss Helmet's titleTemplate Aug 31, 2022
@nathan-alden-sr
Copy link
Author

Closed in favor of #17.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant