svelte-meta-tags 2.6.4 → 2.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +72 -72
- package/package.json +17 -18
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
[](https://www.npmjs.com/package/svelte-meta-tags)
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
7
7
|
|
|
8
|
-
Svelte Meta Tags
|
|
8
|
+
Svelte Meta Tags provides components designed to help you manage SEO for Svelte projects.
|
|
9
9
|
|
|
10
10
|
[Demo](https://svelte.dev/repl/ffd783c9b8e54d97b6b7cac6eadace42)
|
|
11
11
|
|
|
@@ -124,54 +124,54 @@ pnpm add -D svelte-meta-tags
|
|
|
124
124
|
|
|
125
125
|
### MetaTags Properties
|
|
126
126
|
|
|
127
|
-
| Property | Type | Description
|
|
128
|
-
| ---------------------------------- | ----------------------- |
|
|
129
|
-
| `title` | string | Sets the
|
|
130
|
-
| `titleTemplate` | string | Allows you to set default title template that will be added to your title [More Info](#title-template)
|
|
131
|
-
| `noindex` | boolean (default false) |
|
|
132
|
-
| `nofollow` | boolean (default false) |
|
|
133
|
-
| `additionRobotsProps` | Object | Set the
|
|
134
|
-
| `description` | string | Sets the
|
|
135
|
-
| `canonical` | string |
|
|
136
|
-
| `mobileAlternate.media` | string | Set
|
|
137
|
-
| `mobileAlternate.href` | string | Set the mobile page
|
|
138
|
-
| `languageAlternates` | array | Set the language of the alternate urls. Expects array of objects with the shape: `{ hrefLang: string, href: string }`
|
|
139
|
-
| `additionalMetaTags` | array | Allows you to add a meta tag that is not documented here
|
|
140
|
-
| `additionalLinkTags` | array | Allows you to add a link tag that is not documented here
|
|
141
|
-
| `twitter.cardType` | string | The card type, which will be one of `summary`, `summary_large_image`, `app`, or `player`
|
|
142
|
-
| `twitter.site` | string | @username for the website used in the card footer
|
|
143
|
-
| `twitter.handle` | string | @username for the
|
|
144
|
-
| `twitter.title` | string | The concise title for the related content
|
|
145
|
-
| `twitter.description` | string | The description that concisely summarizes the content
|
|
146
|
-
| `twitter.image` | string | The URL to a unique image
|
|
147
|
-
| `twitter.imageAlt` | string | The
|
|
148
|
-
| `facebook.appId` | string |
|
|
149
|
-
| `openGraph.url` | string | The canonical URL of your object
|
|
150
|
-
| `openGraph.type` | string | The type of your object. Depending on the type you specify, other properties may also be required [More Info](#open-graph)
|
|
151
|
-
| `openGraph.title` | string | The open graph title, this can be different
|
|
152
|
-
| `openGraph.description` | string | The open graph description,
|
|
153
|
-
| `openGraph.images` | array | An array of images to
|
|
154
|
-
| `openGraph.videos` | array | An array of videos (object)
|
|
155
|
-
| `openGraph.locale` | string | The locale the open graph tags are
|
|
156
|
-
| `openGraph.site_name` | string | If your
|
|
157
|
-
| `openGraph.profile.firstName` | string | Person's first name
|
|
158
|
-
| `openGraph.profile.lastName` | string | Person's last name
|
|
159
|
-
| `openGraph.profile.username` | string | Person's username
|
|
160
|
-
| `openGraph.profile.gender` | string | Person's gender
|
|
161
|
-
| `openGraph.book.authors` | string[] |
|
|
162
|
-
| `openGraph.book.isbn` | string | The [ISBN](https://en.wikipedia.org/wiki/International_Standard_Book_Number)
|
|
163
|
-
| `openGraph.book.releaseDate` | datetime | The date the book was released
|
|
164
|
-
| `openGraph.book.tags` | string[] | Tag words
|
|
165
|
-
| `openGraph.article.publishedTime` | datetime | When the article was first published
|
|
166
|
-
| `openGraph.article.modifiedTime` | datetime | When the
|
|
167
|
-
| `openGraph.article.expirationTime` | datetime | When the article is out of date after
|
|
168
|
-
| `openGraph.article.authors` | string[] |
|
|
169
|
-
| `openGraph.article.section` | string | A high-level section name. E.g. Technology
|
|
170
|
-
| `openGraph.article.tags` | string[] | Tag words associated with this article
|
|
127
|
+
| Property | Type | Description |
|
|
128
|
+
| ---------------------------------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
129
|
+
| `title` | string | Sets the meta title of the page |
|
|
130
|
+
| `titleTemplate` | string | Allows you to set the default title template that will be added to your title [More Info](#title-template) |
|
|
131
|
+
| `noindex` | boolean (default false) | Specifies whether the page should be indexed or not |
|
|
132
|
+
| `nofollow` | boolean (default false) | Specifies whether or not to follow the page |
|
|
133
|
+
| `additionRobotsProps` | Object | Set the additional meta information for the `X-Robots-Tag` [More Info](#robotsprops) |
|
|
134
|
+
| `description` | string | Sets the meta description of the page |
|
|
135
|
+
| `canonical` | string | Make the page canonical URL |
|
|
136
|
+
| `mobileAlternate.media` | string | Set the screen size from which the mobile site will be served |
|
|
137
|
+
| `mobileAlternate.href` | string | Set the alternate URL for the mobile page |
|
|
138
|
+
| `languageAlternates` | array | Set the language of the alternate urls. Expects array of objects with the shape: `{ hrefLang: string, href: string }` |
|
|
139
|
+
| `additionalMetaTags` | array | Allows you to add a meta tag that is not documented here [More Info](#additional-meta-tags) |
|
|
140
|
+
| `additionalLinkTags` | array | Allows you to add a link tag that is not documented here [More Info](#additional-link-tags) |
|
|
141
|
+
| `twitter.cardType` | string | The card type, which will be one of `summary`, `summary_large_image`, `app`, or `player` |
|
|
142
|
+
| `twitter.site` | string | @username for the website used in the card footer |
|
|
143
|
+
| `twitter.handle` | string | @username for the creator of the content (output as `twitter:creator`) |
|
|
144
|
+
| `twitter.title` | string | The concise title for the related content |
|
|
145
|
+
| `twitter.description` | string | The description that concisely summarizes the content in a manner suitable for presentation within a Tweet. You should not reuse the title as the description or use this field to describe the general services provided by the website |
|
|
146
|
+
| `twitter.image` | string | The URL to a unique image that represents the content of the page. You should not use a generic image such as your site logo, author photo, or other image that spans multiple pages. Images for this card support a 1:1 aspect ratio with a minimum size of 144x144 pixels or a maximum size of 4096x4096 pixels. Images must be less than 5MB in size. The image will be cropped to a square on all platforms. JPG, PNG, WEBP, and GIF formats are supported. Only the first frame of an animated GIF is used. SVG is not supported |
|
|
147
|
+
| `twitter.imageAlt` | string | The textual description of the image that conveys the essence of the image to visually impaired users. Maximum 420 characters |
|
|
148
|
+
| `facebook.appId` | string | For Facebook Insights, you will need to add a Facebook app ID to your page in order to use it |
|
|
149
|
+
| `openGraph.url` | string | The canonical URL of your object, which will be used as its permanent ID in the graph |
|
|
150
|
+
| `openGraph.type` | string | The type of your object. Depending on the type you specify, other properties may also be required [More Info](#open-graph) |
|
|
151
|
+
| `openGraph.title` | string | The open graph title, this can be different from your meta title |
|
|
152
|
+
| `openGraph.description` | string | The open graph description, which may be different from your meta description |
|
|
153
|
+
| `openGraph.images` | array | An array of images to use as previews. If multiple are provided, you can choose one when sharing [See Examples](#open-graph-examples) |
|
|
154
|
+
| `openGraph.videos` | array | An array of videos (object) |
|
|
155
|
+
| `openGraph.locale` | string | The locale in which the open graph tags are highlighted |
|
|
156
|
+
| `openGraph.site_name` | string | If your item is part of a larger website, the name that should be displayed for the entire site |
|
|
157
|
+
| `openGraph.profile.firstName` | string | Person's first name |
|
|
158
|
+
| `openGraph.profile.lastName` | string | Person's last name |
|
|
159
|
+
| `openGraph.profile.username` | string | Person's username |
|
|
160
|
+
| `openGraph.profile.gender` | string | Person's gender |
|
|
161
|
+
| `openGraph.book.authors` | string[] | Author of the article [See Examples](#open-graph-examples) |
|
|
162
|
+
| `openGraph.book.isbn` | string | The [ISBN](https://en.wikipedia.org/wiki/International_Standard_Book_Number) |
|
|
163
|
+
| `openGraph.book.releaseDate` | datetime | The date the book was released |
|
|
164
|
+
| `openGraph.book.tags` | string[] | Tag words related to this book |
|
|
165
|
+
| `openGraph.article.publishedTime` | datetime | When the article was first published [See Examples](#open-graph-examples) |
|
|
166
|
+
| `openGraph.article.modifiedTime` | datetime | When the item was last modified |
|
|
167
|
+
| `openGraph.article.expirationTime` | datetime | When the article is out of date after |
|
|
168
|
+
| `openGraph.article.authors` | string[] | Author of the article |
|
|
169
|
+
| `openGraph.article.section` | string | A high-level section name. E.g. Technology |
|
|
170
|
+
| `openGraph.article.tags` | string[] | Tag words associated with this article |
|
|
171
171
|
|
|
172
172
|
#### Title Template
|
|
173
173
|
|
|
174
|
-
|
|
174
|
+
Replace `%s` with your title string.
|
|
175
175
|
|
|
176
176
|
```
|
|
177
177
|
title = 'This is my title'
|
|
@@ -199,7 +199,7 @@ twitter={{
|
|
|
199
199
|
}}
|
|
200
200
|
```
|
|
201
201
|
|
|
202
|
-
|
|
202
|
+
See out the Twitter [documentation](https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/summary) for more information.
|
|
203
203
|
|
|
204
204
|
#### Facebook
|
|
205
205
|
|
|
@@ -209,11 +209,11 @@ facebook={{
|
|
|
209
209
|
}}
|
|
210
210
|
```
|
|
211
211
|
|
|
212
|
-
Add this to your SEO config to include the fb:app_id meta if you need to enable Facebook
|
|
212
|
+
Add this to your SEO config to include the fb:app_id meta if you need to enable Facebook Insights for your site. Information on this can be found in Facebook's [documentation](https://developers.facebook.com/docs/sharing/webmasters/).
|
|
213
213
|
|
|
214
214
|
#### robotsProps
|
|
215
215
|
|
|
216
|
-
In addition to `index, follow
|
|
216
|
+
In addition to `index, follow', the `robots' meta tag accepts more properties to archive more accurate crawling and serve better snippets to SEO bots crawling your page.
|
|
217
217
|
|
|
218
218
|
Example:
|
|
219
219
|
|
|
@@ -238,22 +238,22 @@ Example:
|
|
|
238
238
|
|
|
239
239
|
**Available properties**
|
|
240
240
|
|
|
241
|
-
| Property | Type | Description
|
|
242
|
-
| ------------------ | ------------------------- |
|
|
243
|
-
| `noarchive` | boolean | Do not
|
|
244
|
-
| `nosnippet` | boolean | Do not show a text snippet or video preview in the search results for this page
|
|
245
|
-
| `maxSnippet` | number | Use a maximum of [number] characters as
|
|
246
|
-
| `maxImagePreview` | 'none','standard','large' | Set the maximum size of an image preview for this page in a search
|
|
247
|
-
| `maxVideoPreview` | number | Use a maximum of [number] seconds as a video snippet for videos on this page in search results
|
|
248
|
-
| `notranslate` | boolean | Do not offer translation of this page in search results
|
|
249
|
-
| `noimageindex` | boolean | Do not index images on this page
|
|
250
|
-
| `unavailableAfter` | string | Do not show this page in search results after the specified date/time. The date/time must be
|
|
241
|
+
| Property | Type | Description |
|
|
242
|
+
| ------------------ | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
243
|
+
| `noarchive` | boolean | Do not display a [cached link](https://support.google.com/websearch/answer/1687222) in search results |
|
|
244
|
+
| `nosnippet` | boolean | Do not show a text snippet or video preview in the search results for this page |
|
|
245
|
+
| `maxSnippet` | number | Use a maximum of [number] characters as the text snippet for this search result [Read more](https://developers.google.com/search/reference/robots_meta_tag?hl=en-GB#directives) |
|
|
246
|
+
| `maxImagePreview` | 'none','standard','large' | Set the maximum size of an image preview for this page in a search result |
|
|
247
|
+
| `maxVideoPreview` | number | Use a maximum of [number] seconds as a video snippet for videos on this page in search results [Read more](https://developers.google.com/search/reference/robots_meta_tag?hl=en-GB#directives) |
|
|
248
|
+
| `notranslate` | boolean | Do not offer translation of this page in search results |
|
|
249
|
+
| `noimageindex` | boolean | Do not index images on this page |
|
|
250
|
+
| `unavailableAfter` | string | Do not show this page in search results after the specified date/time. The date/time must be in a widely accepted format, including but not limited to RFC 822, RFC 850, and ISO 8601 |
|
|
251
251
|
|
|
252
|
-
For more
|
|
252
|
+
For more information on the `X-Robots-Tag` visit [Google Search Central - Control Crawling and Indexing](https://developers.google.com/search/reference/robots_meta_tag?hl=en-GB#directives)
|
|
253
253
|
|
|
254
254
|
#### Alternate
|
|
255
255
|
|
|
256
|
-
This link
|
|
256
|
+
This link relationship is used to indicate a relationship between a desktop and mobile website to search engines.
|
|
257
257
|
|
|
258
258
|
Example:
|
|
259
259
|
|
|
@@ -275,9 +275,9 @@ languageAlternates={[
|
|
|
275
275
|
|
|
276
276
|
#### Additional Meta Tags
|
|
277
277
|
|
|
278
|
-
This allows you to add any other meta tags that are not
|
|
278
|
+
This allows you to add any other meta tags that are not required by the `config`.
|
|
279
279
|
|
|
280
|
-
`content` is required. Then either `name`, `property` or `httpEquiv`. (
|
|
280
|
+
`content` is required. Then either `name`, `property` or `httpEquiv`. (only one of each)
|
|
281
281
|
|
|
282
282
|
Example:
|
|
283
283
|
|
|
@@ -300,7 +300,7 @@ additionalMetaTags={[
|
|
|
300
300
|
|
|
301
301
|
Invalid Examples:
|
|
302
302
|
|
|
303
|
-
These are invalid
|
|
303
|
+
These are invalid because they contain more than one of `name`, `property`, and `httpEquiv` in the same entry.
|
|
304
304
|
|
|
305
305
|
```js
|
|
306
306
|
additionalMetaTags={[
|
|
@@ -379,7 +379,7 @@ it will result in this being rendered:
|
|
|
379
379
|
|
|
380
380
|
## Open Graph
|
|
381
381
|
|
|
382
|
-
|
|
382
|
+
The full specification can be found at <http://ogp.me/>.
|
|
383
383
|
|
|
384
384
|
Svelte Meta Tags currently supports:
|
|
385
385
|
|
|
@@ -570,22 +570,22 @@ Full info on [http://ogp.me/](http://ogp.me/#type_video)
|
|
|
570
570
|
|
|
571
571
|
## JSON-LD
|
|
572
572
|
|
|
573
|
-
JSON-LD
|
|
573
|
+
JSON-LD allows for more customized and richer display, such as in search results.
|
|
574
574
|
|
|
575
|
-
To discover all the different content types JSON-LD offers
|
|
575
|
+
To discover all the different content types that JSON-LD offers, go to: https://developers.google.com/search/docs/guides/search-gallery
|
|
576
576
|
|
|
577
577
|
It is also possible to use multiple `<JsonLd />` components in a single page.
|
|
578
578
|
|
|
579
579
|
### Using `schema-dts`
|
|
580
580
|
|
|
581
|
-
This plugin uses [schema-dts](https://github.com/google/schema-dts), so it
|
|
581
|
+
This plugin uses [schema-dts](https://github.com/google/schema-dts), so it provides other types than the examples below.
|
|
582
582
|
|
|
583
583
|
### JSON-LD Properties
|
|
584
584
|
|
|
585
|
-
| Property | Type | Description
|
|
586
|
-
| -------- | --------------------- |
|
|
587
|
-
| `output` | string (default head) |
|
|
588
|
-
| `schema` | Object | Data in `ld+json` format
|
|
585
|
+
| Property | Type | Description |
|
|
586
|
+
| -------- | --------------------- | -------------------------------------------------------------------------------------------------------- |
|
|
587
|
+
| `output` | string (default head) | Specifies whether to output json-ld in `<head>` or `<body>`. Possible values are either `head` or `body` |
|
|
588
|
+
| `schema` | Object | Data in `ld+json` format [See Examples](#json-ld-examples) |
|
|
589
589
|
|
|
590
590
|
### JSON-LD Examples
|
|
591
591
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svelte-meta-tags",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.5",
|
|
4
4
|
"description": "Svelte Meta Tags is a plugin that makes managing your SEO easier in Svelte projects.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -21,25 +21,24 @@
|
|
|
21
21
|
"schema-dts": "^1.1.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@playwright/test": "^1.
|
|
25
|
-
"@sveltejs/adapter-auto": "^1.0.
|
|
26
|
-
"@sveltejs/kit": "^1.
|
|
27
|
-
"@sveltejs/package": "^1.0.
|
|
28
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
29
|
-
"@typescript-eslint/parser": "^5.
|
|
30
|
-
"eslint": "^8.
|
|
31
|
-
"eslint-config-prettier": "^8.
|
|
24
|
+
"@playwright/test": "^1.29.2",
|
|
25
|
+
"@sveltejs/adapter-auto": "^1.0.2",
|
|
26
|
+
"@sveltejs/kit": "^1.1.4",
|
|
27
|
+
"@sveltejs/package": "^1.0.2",
|
|
28
|
+
"@typescript-eslint/eslint-plugin": "^5.48.2",
|
|
29
|
+
"@typescript-eslint/parser": "^5.48.2",
|
|
30
|
+
"eslint": "^8.32.0",
|
|
31
|
+
"eslint-config-prettier": "^8.6.0",
|
|
32
32
|
"eslint-plugin-svelte3": "^4.0.0",
|
|
33
|
-
"husky": "^8.0.
|
|
34
|
-
"lint-staged": "^13.0
|
|
35
|
-
"prettier": "^2.
|
|
36
|
-
"prettier-plugin-svelte": "^2.
|
|
37
|
-
"svelte": "^3.
|
|
38
|
-
"svelte-check": "^
|
|
39
|
-
"svelte-preprocess": "^4.10.7",
|
|
33
|
+
"husky": "^8.0.3",
|
|
34
|
+
"lint-staged": "^13.1.0",
|
|
35
|
+
"prettier": "^2.8.3",
|
|
36
|
+
"prettier-plugin-svelte": "^2.9.0",
|
|
37
|
+
"svelte": "^3.55.1",
|
|
38
|
+
"svelte-check": "^3.0.2",
|
|
40
39
|
"tslib": "^2.4.1",
|
|
41
|
-
"typescript": "^4.9.
|
|
42
|
-
"vite": "^
|
|
40
|
+
"typescript": "^4.9.4",
|
|
41
|
+
"vite": "^4.0.4"
|
|
43
42
|
},
|
|
44
43
|
"peerDependencies": {
|
|
45
44
|
"svelte": "^3.44.0"
|