unhead 1.1.13 → 1.1.15
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/dist/index.cjs +2 -3
- package/dist/index.mjs +2 -3
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -307,8 +307,7 @@ function TemplateParamsPlugin() {
|
|
|
307
307
|
const idx = tags.findIndex((tag) => tag.tag === "templateParams");
|
|
308
308
|
const params = idx !== -1 ? tags[idx].textContent : {};
|
|
309
309
|
params.pageTitle = params.pageTitle || title || "";
|
|
310
|
-
|
|
311
|
-
for (const tag of tags.filter(Boolean)) {
|
|
310
|
+
for (const tag of tags) {
|
|
312
311
|
if (["titleTemplate", "title"].includes(tag.tag) && typeof tag.textContent === "string")
|
|
313
312
|
tag.textContent = processTemplateParams(tag.textContent, params);
|
|
314
313
|
else if (tag.tag === "meta" && typeof tag.props.content === "string")
|
|
@@ -316,7 +315,7 @@ function TemplateParamsPlugin() {
|
|
|
316
315
|
else if (tag.tag === "script" && ["application/json", "application/ld+json"].includes(tag.props.type) && typeof tag.innerHTML === "string")
|
|
317
316
|
tag.innerHTML = processTemplateParams(tag.innerHTML, params);
|
|
318
317
|
}
|
|
319
|
-
ctx.tags = tags.filter(
|
|
318
|
+
ctx.tags = tags.filter((tag) => tag.tag !== "templateParams");
|
|
320
319
|
}
|
|
321
320
|
}
|
|
322
321
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -305,8 +305,7 @@ function TemplateParamsPlugin() {
|
|
|
305
305
|
const idx = tags.findIndex((tag) => tag.tag === "templateParams");
|
|
306
306
|
const params = idx !== -1 ? tags[idx].textContent : {};
|
|
307
307
|
params.pageTitle = params.pageTitle || title || "";
|
|
308
|
-
|
|
309
|
-
for (const tag of tags.filter(Boolean)) {
|
|
308
|
+
for (const tag of tags) {
|
|
310
309
|
if (["titleTemplate", "title"].includes(tag.tag) && typeof tag.textContent === "string")
|
|
311
310
|
tag.textContent = processTemplateParams(tag.textContent, params);
|
|
312
311
|
else if (tag.tag === "meta" && typeof tag.props.content === "string")
|
|
@@ -314,7 +313,7 @@ function TemplateParamsPlugin() {
|
|
|
314
313
|
else if (tag.tag === "script" && ["application/json", "application/ld+json"].includes(tag.props.type) && typeof tag.innerHTML === "string")
|
|
315
314
|
tag.innerHTML = processTemplateParams(tag.innerHTML, params);
|
|
316
315
|
}
|
|
317
|
-
ctx.tags = tags.filter(
|
|
316
|
+
ctx.tags = tags.filter((tag) => tag.tag !== "templateParams");
|
|
318
317
|
}
|
|
319
318
|
}
|
|
320
319
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unhead",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.15",
|
|
5
5
|
"packageManager": "pnpm@7.28.0",
|
|
6
6
|
"author": "Harlan Wilton <harlan@harlanzw.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"hookable": "^5.4.2",
|
|
34
|
-
"@unhead/dom": "1.1.
|
|
35
|
-
"@unhead/schema": "1.1.
|
|
36
|
-
"@unhead/shared": "1.1.
|
|
34
|
+
"@unhead/dom": "1.1.15",
|
|
35
|
+
"@unhead/schema": "1.1.15",
|
|
36
|
+
"@unhead/shared": "1.1.15"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"packrup": "^0.1.0"
|