Skip to content

refacto: moved title meta tag in pages #278

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

Merged
merged 3 commits into from
Mar 24, 2021

Conversation

justinezahiri
Copy link
Contributor

related to #260
moved title meta tag in pages instead of components

<div>
<Head>
<title>{ {{{lc}}} && `Edit {{{ucf}}} ${ {{~lc}}['@id']}`}</title>
<meta property="og:title" content={ {{{lc}}} && `Edit{{{ucf}}} ${ {{~lc}}['@id']}`} key="title" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this necessary if the content is the same as the <title> tag?

Copy link
Contributor Author

@justinezahiri justinezahiri Mar 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that the <title> tag is used by Google and meta property="og:title" is used by social medias.
(see: https://www.quora.com/In-terms-of-SEO-value-does-the-Open-Graph-meta-title-tag-meta-property-og-title-have-as-much-value-as-a-Title-tag-Can-we-leave-title-tag-out, it's an old thread but maybe still valid, see NextJS documentation examples about <Head /> component : https://nextjs.org/docs/api-reference/next/head)

<div>
<div>
<Head>
<title>{`Show {{{ucf}}} ${ {{~lc}}['@id']}`}</title>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<title>{`Show {{{ucf}}} ${ {{~lc}}['@id']}`}</title>
<title>{`Show {{{ucf}}} ${ {{~lc}}['@id']}`}</title>

@dunglas dunglas merged commit eef2629 into api-platform:main Mar 24, 2021
@dunglas
Copy link
Member

dunglas commented Mar 24, 2021

Thanks @justinezahiri

justinezahiri added a commit to justinezahiri/api-platform-client-generator that referenced this pull request Aug 5, 2021
* refacto: moved title meta tag in pages

* fixed typo in imports

* removed og:title from Head
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

Successfully merging this pull request may close these issues.

2 participants