oekazuma/svelte-meta-tags

v3

oekazuma opened this issue ยท 7 comments

Here is a summary of what needs to be done for v3.
Please give me any requests you would like to see added to v3.

  • ๐Ÿ”ฅ Remove the googlebot tag. If necessary, you can add it by using Additional Meta Tags
    • Related Issues #783
  • ๐Ÿ”ง More flexible customization of robots
    • Related Issues #753
  • โœจ Improved type definitions
    • Related Issues #796
  • ๐Ÿ‘จโ€๐Ÿ’ป Migration to monorepo
    • Related Issues #794

Migration Guide

  • noindex and nofollow properties have been removed. They can be controlled by using the robots property instead.

v2.x

<MetaTags noindex={true} nofollow={true} />

v3

<MetaTags robots="noindex,nofollow" />
  • googlebot is no longer included by default, so if you want to continue to enable the googlebot, write the following.
<MetaTags
  additionalMetaTags={[
    {
      name: 'googlebot',
      content: 'index,follow'
    }
  ]}
/>
  • <meta name="robots"> element can now be disabled completely.
<MetaTags
  robots={false}
/>

If you want to disable <meta name="robots"> and enable only <meta name="googlebot">, write the following.

<MetaTags
  robots={false}
  additionalMetaTags={[
    {
      name: 'googlebot',
      content: 'index,follow'
    }
  ]}
/>
  • robotsProps property has been renamed additionalRobotsProps.

v2.x

<MetaTags
  robotsProps={{
    nosnippet: true,
    notranslate: true,
    noimageindex: true,
    noarchive: true,
    maxSnippet: -1,
    maxImagePreview: 'none',
    maxVideoPreview: -1
  }}
/>

v3

<MetaTags
  additionalRobotsProps={{
    nosnippet: true,
    notranslate: true,
    noimageindex: true,
    noarchive: true,
    maxSnippet: -1,
    maxImagePreview: 'none',
    maxVideoPreview: -1
  }}
/>
  • openGraph.site_name has been renamed to openGraph.siteName.

Reasons:

  1. because site_name will be removed and siteName will be adopted in the next major version of next-seo.
  2. since only site_name had adopted the snake case, its interface was aligned with other properties.

v2.x

<MetaTags
  openGraph={{
    site_name: 'SiteName'
  }}
/>

v3

<MetaTags
  openGraph={{
    siteName: 'SiteName'
  }}
/>

@oekazuma
How about also adding a way to allow only googlebot tag to be set?
I think there is a demand for such.

@watanabemasahiro128
I am working on it, but will be able to enable only googlebot by writing the following.
#789

<MetaTags
  robots={false}
  additionalMetaTags={[
    {
      name: 'googlebot',
      content: 'index,follow'
    }
  ]}
/>

@oekazuma
I see, you have created a new pull request.
Thank you.

What was the motivation behind moving from snake_case to camalCase?

@OllieJT

  1. because site_name will be removed and siteName will be adopted in the next major version of next-seo.
  2. since only site_name had adopted the snake case, its interface was aligned with other properties.
  1. because site_name will be removed and siteName will be adopted in the next major version of next-seo.

Are we following the development of next-seo?

It does not completely follow next-seo, but it is at least a major SEO library.

I believe the move from React to Svelte should be welcomed.

I think this change is reasonable and I only mention it as one reason