meno-core 1.0.51 → 1.0.52
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/build-static.js +2 -2
- package/dist/chunks/{chunk-V7CD7V7W.js → chunk-A725KYFK.js} +2 -2
- package/dist/chunks/{chunk-DM54NPEC.js → chunk-CXCBV2M7.js} +14 -2
- package/dist/chunks/chunk-CXCBV2M7.js.map +7 -0
- package/dist/chunks/{chunk-3KJ6SJZC.js → chunk-LHLHPYSP.js} +2 -2
- package/dist/entries/server-router.js +2 -2
- package/dist/lib/server/index.js +3 -3
- package/lib/server/ssr/metaTagGenerator.ts +19 -1
- package/lib/server/ssrRenderer.test.ts +70 -0
- package/package.json +1 -1
- package/dist/chunks/chunk-DM54NPEC.js.map +0 -7
- /package/dist/chunks/{chunk-V7CD7V7W.js.map → chunk-A725KYFK.js.map} +0 -0
- /package/dist/chunks/{chunk-3KJ6SJZC.js.map → chunk-LHLHPYSP.js.map} +0 -0
package/dist/build-static.js
CHANGED
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
hashContent,
|
|
10
10
|
injectTrackingScript,
|
|
11
11
|
isCMSPage
|
|
12
|
-
} from "./chunks/chunk-
|
|
13
|
-
import "./chunks/chunk-
|
|
12
|
+
} from "./chunks/chunk-LHLHPYSP.js";
|
|
13
|
+
import "./chunks/chunk-CXCBV2M7.js";
|
|
14
14
|
import "./chunks/chunk-2MHDV5BF.js";
|
|
15
15
|
import "./chunks/chunk-I7YIGZXT.js";
|
|
16
16
|
import "./chunks/chunk-WQFG7PAH.js";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
parseJSON,
|
|
16
16
|
resolveSlugToPageId,
|
|
17
17
|
variableService
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-CXCBV2M7.js";
|
|
19
19
|
import {
|
|
20
20
|
configService
|
|
21
21
|
} from "./chunk-2MHDV5BF.js";
|
|
@@ -3369,4 +3369,4 @@ export {
|
|
|
3369
3369
|
createServer,
|
|
3370
3370
|
FileSystemPageProvider
|
|
3371
3371
|
};
|
|
3372
|
-
//# sourceMappingURL=chunk-
|
|
3372
|
+
//# sourceMappingURL=chunk-A725KYFK.js.map
|
|
@@ -1641,6 +1641,17 @@ function extractPageMeta(pageData) {
|
|
|
1641
1641
|
}
|
|
1642
1642
|
return meta;
|
|
1643
1643
|
}
|
|
1644
|
+
function normalizeOgImageUrl(value, baseUrl) {
|
|
1645
|
+
if (!value) return value;
|
|
1646
|
+
let out = value;
|
|
1647
|
+
if (/^\/images\/[^?#]+\.(webp|avif)(\?|#|$)/i.test(out)) {
|
|
1648
|
+
out = out.replace(/\.(webp|avif)(?=\?|#|$)/i, ".jpg");
|
|
1649
|
+
}
|
|
1650
|
+
if (baseUrl && out.startsWith("/")) {
|
|
1651
|
+
out = `${baseUrl.replace(/\/$/, "")}${out}`;
|
|
1652
|
+
}
|
|
1653
|
+
return out;
|
|
1654
|
+
}
|
|
1644
1655
|
function generateMetaTags(meta, url = "", locale = "en", config = DEFAULT_I18N_CONFIG, options) {
|
|
1645
1656
|
const tags = [];
|
|
1646
1657
|
const resolve = (value) => {
|
|
@@ -1670,7 +1681,8 @@ function generateMetaTags(meta, url = "", locale = "en", config = DEFAULT_I18N_C
|
|
|
1670
1681
|
tags.push(`<meta property="og:description" content="${escapeHtml(ogDescription)}" />`);
|
|
1671
1682
|
}
|
|
1672
1683
|
if (ogImage) {
|
|
1673
|
-
|
|
1684
|
+
const normalizedOgImage = normalizeOgImageUrl(ogImage, options?.baseUrl);
|
|
1685
|
+
tags.push(`<meta property="og:image" content="${escapeHtml(normalizedOgImage)}" />`);
|
|
1674
1686
|
}
|
|
1675
1687
|
if (ogType) {
|
|
1676
1688
|
tags.push(`<meta property="og:type" content="${escapeHtml(ogType)}" />`);
|
|
@@ -6371,4 +6383,4 @@ export {
|
|
|
6371
6383
|
FileSystemCMSProvider,
|
|
6372
6384
|
migrateTemplatesDirectory
|
|
6373
6385
|
};
|
|
6374
|
-
//# sourceMappingURL=chunk-
|
|
6386
|
+
//# sourceMappingURL=chunk-CXCBV2M7.js.map
|