svelte-meta-tags 2.4.0 → 2.5.0
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/CHANGELOG.md +6 -0
- package/MetaTags.svelte +5 -0
- package/README.md +17 -0
- package/package.json +11 -11
- package/types.d.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
# [2.4.0](https://github.com/oekazuma/svelte-meta-tags/compare/v2.3.4...v2.4.0) (2022-03-12)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
- add a property that allows selection of whether to output JSON-LD in the head or in the body ([91c9c38](https://github.com/oekazuma/svelte-meta-tags/commit/91c9c3861d5cc9168a6b3d90c2cf734f5c03f890))
|
|
6
|
+
|
|
1
7
|
## [2.3.4](https://github.com/oekazuma/svelte-meta-tags/compare/v2.3.3...v2.3.4) (2022-03-03)
|
|
2
8
|
|
|
3
9
|
### Bug Fixes
|
package/MetaTags.svelte
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
export let title = '';
|
|
3
|
+
export let titleTemplate = '';
|
|
3
4
|
export let noindex = false;
|
|
4
5
|
export let nofollow = false;
|
|
5
6
|
export let robotsProps = undefined;
|
|
@@ -13,6 +14,10 @@
|
|
|
13
14
|
export let additionalMetaTags = undefined;
|
|
14
15
|
export let additionalLinkTags = undefined;
|
|
15
16
|
|
|
17
|
+
if (titleTemplate) {
|
|
18
|
+
title = titleTemplate.replace(/%s/g, title);
|
|
19
|
+
}
|
|
20
|
+
|
|
16
21
|
let robotsParams = '';
|
|
17
22
|
if (robotsProps) {
|
|
18
23
|
const {
|
package/README.md
CHANGED
|
@@ -129,6 +129,7 @@ pnpm add -D svelte-meta-tags
|
|
|
129
129
|
| Property | Type | Description |
|
|
130
130
|
| ---------------------------------- | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
131
131
|
| `title` | string | Sets the page meta title. |
|
|
132
|
+
| `titleTemplate` | string | Allows you to set default title template that will be added to your title [More Info](#title-template) |
|
|
132
133
|
| `noindex` | boolean (default false) | Sets whether page should be indexed or not |
|
|
133
134
|
| `nofollow` | boolean (default false) | Sets whether page should be followed or not |
|
|
134
135
|
| `additionRobotsProps` | Object | Set the more meta information for the `X-Robots-Tag` [More Info](#robotsprops) |
|
|
@@ -170,6 +171,22 @@ pnpm add -D svelte-meta-tags
|
|
|
170
171
|
| `openGraph.article.section` | string | A high-level section name. E.g. Technology |
|
|
171
172
|
| `openGraph.article.tags` | string[] | Tag words associated with this article. |
|
|
172
173
|
|
|
174
|
+
#### Title Template
|
|
175
|
+
|
|
176
|
+
Replaces `%s` with your title string
|
|
177
|
+
|
|
178
|
+
```js
|
|
179
|
+
title = 'This is my title';
|
|
180
|
+
titleTemplate = 'Svelte Meta Tags | %s';
|
|
181
|
+
// outputs: Svelte Meta Tags | This is my title
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
```js
|
|
185
|
+
title = 'This is my title';
|
|
186
|
+
titleTemplate = '%s | Svelte Meta Tags';
|
|
187
|
+
// outputs: This is my title | Svelte Meta Tags
|
|
188
|
+
```
|
|
189
|
+
|
|
173
190
|
#### Twitter
|
|
174
191
|
|
|
175
192
|
```js
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svelte-meta-tags",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
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,28 +21,28 @@
|
|
|
21
21
|
"schema-dts": "1.1.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@commitlint/cli": "16.2.
|
|
24
|
+
"@commitlint/cli": "16.2.3",
|
|
25
25
|
"@commitlint/config-conventional": "16.2.1",
|
|
26
26
|
"@semantic-release/changelog": "6.0.1",
|
|
27
27
|
"@semantic-release/git": "10.0.1",
|
|
28
|
-
"@sveltejs/adapter-auto": "1.0.0-next.
|
|
29
|
-
"@sveltejs/kit": "1.0.0-next.
|
|
30
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
31
|
-
"@typescript-eslint/parser": "5.
|
|
32
|
-
"cypress": "9.5.
|
|
28
|
+
"@sveltejs/adapter-auto": "1.0.0-next.33",
|
|
29
|
+
"@sveltejs/kit": "1.0.0-next.301",
|
|
30
|
+
"@typescript-eslint/eslint-plugin": "5.15.0",
|
|
31
|
+
"@typescript-eslint/parser": "5.15.0",
|
|
32
|
+
"cypress": "9.5.2",
|
|
33
33
|
"eslint": "8.11.0",
|
|
34
34
|
"eslint-config-prettier": "8.5.0",
|
|
35
35
|
"eslint-plugin-cypress": "2.12.1",
|
|
36
36
|
"eslint-plugin-svelte3": "3.4.1",
|
|
37
37
|
"husky": "7.0.4",
|
|
38
|
-
"lint-staged": "12.3.
|
|
39
|
-
"prettier": "2.
|
|
38
|
+
"lint-staged": "12.3.7",
|
|
39
|
+
"prettier": "2.6.0",
|
|
40
40
|
"prettier-plugin-svelte": "2.6.0",
|
|
41
41
|
"semantic-release": "19.0.2",
|
|
42
42
|
"svelte": "3.46.4",
|
|
43
|
-
"svelte-check": "2.4.
|
|
43
|
+
"svelte-check": "2.4.6",
|
|
44
44
|
"svelte-preprocess": "4.10.4",
|
|
45
|
-
"svelte2tsx": "0.5.
|
|
45
|
+
"svelte2tsx": "0.5.6",
|
|
46
46
|
"tslib": "2.3.1",
|
|
47
47
|
"typescript": "4.6.2"
|
|
48
48
|
},
|