diff --git a/README.md b/README.md index adb3fe3..253b4a5 100644 --- a/README.md +++ b/README.md @@ -36,13 +36,13 @@ Propname | Type | Description ------------ | ------------- | ------------- title | string | The title of the page. 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. If you don't define this, `Astro.request.canonicalURL.href` will be used as the default value. +canonical | string | Prevent duplicate content issues by specifying the "canonical" or "preferred" url of a web page. If you don't define this, `Astro.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 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.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.canonicalURL.href` will be used as the default value. openGraph.optional.audio | string | A URL to an audio file to accompany this object. openGraph.optional.description | string | A one to two sentence description of your object. openGraph.optional.determiner | string | The word that appears before this object's title in a sentence. An enum of (a, an, the, "", auto). If auto is chosen, the consumer of your data should chose between "a" or "an". Default is "" (blank). diff --git a/cypress/integration/seo.spec.js b/cypress/integration/seo.spec.js index f68adc9..590b95a 100644 --- a/cypress/integration/seo.spec.js +++ b/cypress/integration/seo.spec.js @@ -106,7 +106,7 @@ describe("Basic Tags Without URL", () => { ); }); - it("The Open Graph Url property defaults to Astro.request.canonicalURL.href", () => { + it("The Open Graph Url property defaults to Astro.canonicalURL.href", () => { cy.get('head meta[property="og:url"]').should( "have.attr", "content", diff --git a/src/SEO.astro b/src/SEO.astro index 59147f2..803d2ab 100644 --- a/src/SEO.astro +++ b/src/SEO.astro @@ -103,7 +103,7 @@ validateProps(props); {title ? {title} : null} - + {description ? : null} diff --git a/src/components/OpenGraphBasicTags.astro b/src/components/OpenGraphBasicTags.astro index 4e108cf..7968650 100644 --- a/src/components/OpenGraphBasicTags.astro +++ b/src/components/OpenGraphBasicTags.astro @@ -5,4 +5,4 @@ const { openGraph } = Astro.props; - +