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

Pre-set meta tags #7

Closed
ccorda opened this issue Jul 30, 2020 · 3 comments
Closed

Pre-set meta tags #7

ccorda opened this issue Jul 30, 2020 · 3 comments

Comments

@ccorda
Copy link
Contributor

ccorda commented Jul 30, 2020

Helmet is no longer using the syntax we are in this repo, can we update to their simpler HTML syntax:
nfl/react-helmet#246

Also can we show an example of a default, and then of a child template over-riding.

@ccorda
Copy link
Contributor Author

ccorda commented Jul 30, 2020

Also, it sounds like we might be better off just using next/head, since it's baked in and I think it supports everything we'd need:

https://stackoverflow.com/questions/61063193/react-helmet-or-next-head-for-next-js-project

@ccorda
Copy link
Contributor Author

ccorda commented Jul 30, 2020

I've been playing this and ended up with something similar to this:
https://www.creativebloq.com/how-to/build-an-seo-friendly-head-component-for-nextjsreact

The advantages are you can pass in {title, description, image} and then generate all the markup from there.

@kylehotchkiss
Copy link
Member

By the way, just like react-helmet, you can use next/head anywhere in your render tree—not just the App component like in your example—and all the tags will be aggregated into the tag at the top.

Agreed on next/head. Helmet always required a bunch of random changes to _app.js/_document.js that shouldn't be necessary with next/head.

@ccorda ccorda closed this as completed in 95c55f6 Aug 7, 2020
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

2 participants