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

Added keys to tags in <Head> component #417

Merged
7 changes: 5 additions & 2 deletions examples/example-blog/components/meta.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export function Meta({ title, tags }: MetaProps) {
return (
<Head>
<link
key="canonical_link"
rel="canonical"
href={`${process.env.NEXT_PUBLIC_BASE_URL}${
router.asPath !== "/" ? router.asPath : ""
Expand All @@ -37,15 +38,17 @@ export function Meta({ title, tags }: MetaProps) {
<>
<title>{`${title} | Next.js for Drupal`}</title>
<meta
key="description"
name="description"
content="A Next.js blog powered by a Drupal backend."
/>
<meta
key="og_image"
property="og:image"
content={`${process.env.NEXT_PUBLIC_BASE_URL}/images/meta.jpg`}
/>
<meta property="og:image:width" content="800" />
<meta property="og:image:height" content="600" />
<meta key="og_image_width" property="og:image:width" content="800" />
<meta key="og_image_height" property="og:image:height" content="600" />
</>
)}
</Head>
Expand Down
2 changes: 1 addition & 1 deletion examples/example-graphql/pages/[...slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default function NodePage({ resource }) {
<Layout>
<Head>
<title>{resource.title}</title>
<meta name="description" content="A Next.js site powered by Drupal." />
<meta key="description" name="description" content="A Next.js site powered by Drupal." />
</Head>
{resource && <NodeArticle node={resource} />}
</Layout>
Expand Down
1 change: 1 addition & 0 deletions examples/example-graphql/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export default function IndexPage({ articles }) {
<Head>
<title>Next.js for Drupal</title>
<meta
key="description"
name="description"
content="A Next.js site powered by a Drupal backend."
/>
Expand Down
7 changes: 5 additions & 2 deletions examples/example-marketing/components/meta.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export function Meta({ title, tags }: MetaProps) {
return (
<Head>
<link
key="canonical_link"
rel="canonical"
href={`${process.env.NEXT_PUBLIC_BASE_URL}${
router.asPath !== "/" ? router.asPath : ""
Expand All @@ -37,15 +38,17 @@ export function Meta({ title, tags }: MetaProps) {
<>
<title>{`${title} | Next.js for Drupal`}</title>
<meta
key="description"
name="description"
content="A Next.js blog powered by a Drupal backend."
/>
<meta
key="og_image"
property="og:image"
content={`${process.env.NEXT_PUBLIC_BASE_URL}/images/meta.jpg`}
/>
<meta property="og:image:width" content="800" />
<meta property="og:image:height" content="600" />
<meta key="og_image_width" property="og:image:width" content="800" />
<meta key="og_image_height" property="og:image:height" content="600" />
</>
)}
</Head>
Expand Down
1 change: 1 addition & 0 deletions examples/example-query/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export default function IndexPage({
<Head>
<title>Example Query</title>
<meta
key="description"
name="description"
content="A Next.js site powered by a Drupal backend."
/>
Expand Down
8 changes: 5 additions & 3 deletions examples/example-umami/components/meta.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,19 @@ export function Meta({ title, description }: MetaProps) {
return (
<Head>
<link
key="canonical_link"
rel="canonical"
href={absoluteURL(router.asPath !== "/" ? router.asPath : "")}
/>
<title>{`${title} | ${siteConfig.name}`}</title>
<meta name="description" content={description || siteConfig.slogan} />
<meta key="description" name="description" content={description || siteConfig.slogan} />
<meta
key="og_image"
property="og:image"
content={`${process.env.NEXT_PUBLIC_BASE_URL}/images/meta.jpg`}
/>
<meta property="og:image:width" content="800" />
<meta property="og:image:height" content="600" />
<meta key="og_image_width" property="og:image:width" content="800" />
<meta key="og_image_height" property="og:image:height" content="600" />
</Head>
)
}
Loading