Comparing version 0.3.14 to 0.4.0
{ | ||
"name": "astro-seo", | ||
"version": "0.3.14", | ||
"version": "0.4.0", | ||
"description": "Makes it easy to add SEO relevant tags to your Astro app.", | ||
@@ -27,3 +27,4 @@ "homepage": "https://github.com/jonasmerlin/astro-seo#readme", | ||
"preview": "astro preview", | ||
"format": "yarn prettier -w ./src" | ||
"format": "yarn prettier -w ./src", | ||
"release": "standard-version" | ||
}, | ||
@@ -34,4 +35,5 @@ "devDependencies": { | ||
"prettier": "^2.4.1", | ||
"prettier-plugin-astro": "^0.0.9" | ||
"prettier-plugin-astro": "^0.0.9", | ||
"standard-version": "^9.3.2" | ||
} | ||
} |
@@ -43,9 +43,9 @@ ![Astro SEO Logo](https://user-images.githubusercontent.com/5182256/131216951-8f74f425-f775-463d-a11b-0e01ad9fce8d.png) | ||
description | string | Text that gives a concise description of what your page is about. | ||
canonical | string | Prevent duplicate content issues by specifying the "canonical" or "preferred" url of a web page. | ||
canonical | string | Prevent duplicate content issues by specifying the "canonical" or "preferred" url of a web page. If you don't define this, Astro.request.canonicalURL.href will be used as the default value. | ||
noindex | boolean | Set this to true if you don't want search engines to index your page. Since this is an SEO component, this gets set to `false` by default. This way, indexing is strictly opt-out. | ||
nofollow | boolean | Set this to true if you don't want search engines to follow links on your page. Since this is an SEO component, this gets set to `false` by default. This way, following links is strictly opt-out. | ||
openGraph.basic.title | string | Set the title Open Graph should use. __In most situations, this should be _different_ from the value of the `title` prop.__ See [this tweet](https://twitter.com/jon_neal/status/1428721238071988237) to gain an understanding of the difference between the two. If you define this, you must define the other 3 OG basic properties as well: `type`, `image` and `url`. ([Learn more.](https://ogp.me/#metadata)) | ||
openGraph.basic.type | string | Set the [type](https://ogp.me/#types) Open Graph should use. If you define this, you must define the other 3 OG basic properties as well: `title`, `image` and `url`. ([Learn more.](https://ogp.me/#metadata)) | ||
openGraph.basic.image | string | URL of the image that should be used in social media previews. If you define this, you must define the other 3 OG basic properties as well: `title`, `type` and `url`. ([Learn more.](https://ogp.me/#metadata)) | ||
openGraph.basic.url | string | The canonical URL of your object that will be used as its permanent ID in the graph. Mostl likely either the url of the page or its canonical url (see above). If you define this, you must define the other 3 OG basic properties as well: `title`, `type` and `image`. ([Learn more.](https://ogp.me/#metadata)) | ||
openGraph.basic.title | string | Set the title Open Graph should use. __In most situations, this should be _different_ from the value of the `title` prop.__ See [this tweet](https://twitter.com/jon_neal/status/1428721238071988237) to gain an understanding of the difference between the two. If you define this, you must define two other OG basic properties as well: `type` and `image`. ([Learn more.](https://ogp.me/#metadata)) | ||
openGraph.basic.type | string | Set the [type](https://ogp.me/#types) Open Graph should use. If you define this, you must define two other OG basic properties as well: `title` and `image`. ([Learn more.](https://ogp.me/#metadata)) | ||
openGraph.basic.image | string | URL of the image that should be used in social media previews. If you define this, you must define two other OG basic properties as well: `title` and `type`. ([Learn more.](https://ogp.me/#metadata)) | ||
openGraph.basic.url | string | The canonical URL of your object that will be used as its permanent ID in the graph. Most likely either the url of the page or its canonical url (see above). If you define this, you must define the other 3 OG basic properties as well: `title`, `type` and `image`. ([Learn more.](https://ogp.me/#metadata)). If you define the other 3 OG basic properties but don't define this, `Astro.request.canonicalURL.href` will be used as the default value. | ||
openGraph.optional.audio | string | A URL to an audio file to accompany this object. | ||
@@ -73,3 +73,28 @@ openGraph.optional.description | string | A one to two sentence description of your object. | ||
twitter.creator | string | Sets `twitter:creator`. (Twitter) @username for the content creator / author. | ||
extend.link | Array<Link extends HTMLLinkElement { prefetch: boolean; }> | An array of free-form `<link>` you'd like to define. | ||
extend.meta | Array<Meta extends HTMLMetaElement { property: string; }> | An array of free-form `<meta>` tags you'd like to define. | ||
## Extending Astro SEO | ||
With the `v0.3.14` release, you can now define any `<meta>` and `<link>` tag you want using the `extend` prop. For example : | ||
```js | ||
<SEO | ||
extend={{ | ||
// extending the default link tags | ||
link: [{ rel: "icon", href: "/favicon.ico" }], | ||
// extending the default meta tags | ||
meta: [ | ||
{ | ||
name: "twitter:image", | ||
content: | ||
"https://user-images.githubusercontent.com/5182256/131216951-8f74f425-f775-463d-a11b-0e01ad9fce8d.png", | ||
}, | ||
{ name: "twitter:title", content: "Tinker Tailor Soldier Spy" }, | ||
{ name: "twitter:description", content: "Agent" }, | ||
], | ||
}} | ||
/> | ||
``` | ||
## Open Graph | ||
@@ -76,0 +101,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
151
14568
5