docs: add documentation on twitter and facebook

This commit is contained in:
Kazuma Oe 2021-11-07 17:22:42 +00:00
parent 0aff415610
commit 43a1e3ee71
2 changed files with 2381 additions and 944 deletions

View File

@ -16,6 +16,8 @@ This library is inspired by [next-seo](https://github.com/garmeeh/next-seo)
- [Installing](#-installing)
- [Usage](#-usage)
- [Properties](#properties)
- [Twitter](#twitter)
- [Facebook](#facebook)
- [robotsProps](#robotsprops)
- [Alternate](#alternate)
- [Additional Meta Tags](#additional-meta-tags)
@ -149,6 +151,20 @@ yarn add svelte-meta-tags
| `openGraph.article.section` | string | A high-level section name. E.g. Technology |
| `openGraph.article.tags` | string[] | Tag words associated with this article. |
#### Twitter
Twitter will read the `og:title`, `og:image` and `og:description` tags for their card, this is why `svelte-meta-tags` omits `twitter:title`, `twitter:image` and `twitter:description` so not to duplicate.
#### Facebook
```js
facebook={{
appId: '1234567890',
}}
```
Add this to your SEO config to include the fb:app_id meta if you need to enable Facebook insights for your site. Information regarding this can be found in facebook's [documentation](https://developers.facebook.com/docs/sharing/webmasters/)
#### robotsProps
In addition to `index, follow` the `robots` meta tag accepts more properties to archive a more accurate crawling and serve better snippets for SEO bots that crawl your page.

3309
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff