@bagelink/blox 1.15.670 → 1.15.671
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/{PreviewApp-tGABBSYV.js → PreviewApp-BKrLRDBC.js} +1 -1
- package/dist/{PreviewApp-BNUe-6Nm.cjs → PreviewApp-Kb3uTwtH.cjs} +1 -1
- package/dist/{PreviewApp.vue_vue_type_style_index_0_lang-DyqW-xf-.cjs → PreviewApp.vue_vue_type_style_index_0_lang-AC3W0NSJ.cjs} +1 -1
- package/dist/{PreviewApp.vue_vue_type_style_index_0_lang-DXGJTQpf.js → PreviewApp.vue_vue_type_style_index_0_lang-BMGv1eSR.js} +1 -1
- package/dist/{appRuntime-BotwL3aS.cjs → appRuntime-BU2Ls-Y7.cjs} +2 -1
- package/dist/{appRuntime-CYiKSBIq.js → appRuntime-CWlPH_5r.js} +2 -1
- package/dist/data/useData.d.ts +8 -0
- package/dist/data/useData.d.ts.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +3 -3
- package/dist/{shard-runner-CtJLkov_.js → shard-runner-LgGSa4zZ.js} +2 -2
- package/dist/{shard-runner-C4JE4ywf.cjs → shard-runner-kRQWqGVy.cjs} +2 -2
- package/dist/ssg/cli.cjs +2 -2
- package/dist/ssg/cli.mjs +2 -2
- package/dist/ssg/index.cjs +4 -3
- package/dist/ssg/index.mjs +5 -4
- package/dist/ssg/llm-artifacts.d.ts +15 -0
- package/dist/ssg/llm-artifacts.d.ts.map +1 -1
- package/dist/ssg/render-resolved-page.d.ts.map +1 -1
- package/dist/ssg/seo.d.ts +5 -1
- package/dist/ssg/seo.d.ts.map +1 -1
- package/dist/{validate-output-CgacFje9.js → validate-output-7_TqMVLs.js} +69 -24
- package/dist/{validate-output-BdzD7fIN.cjs → validate-output-CzSMiLrL.cjs} +69 -24
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const PreviewApp_vue_vue_type_style_index_0_lang = require("./PreviewApp.vue_vue_type_style_index_0_lang-
|
|
3
|
+
const PreviewApp_vue_vue_type_style_index_0_lang = require("./PreviewApp.vue_vue_type_style_index_0_lang-AC3W0NSJ.cjs");
|
|
4
4
|
exports.default = PreviewApp_vue_vue_type_style_index_0_lang._sfc_main;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, inject, ref, h, provide, onMounted, onUnmounted, openBlock, createElementBlock, createVNode, unref, nextTick } from "vue";
|
|
2
|
-
import { d as BLOX_REGISTRY_KEY, r as resolveBlockProps, u as useLocale, e as BLOX_RUNTIME_KEY } from "./appRuntime-
|
|
2
|
+
import { d as BLOX_REGISTRY_KEY, r as resolveBlockProps, u as useLocale, e as BLOX_RUNTIME_KEY } from "./appRuntime-CWlPH_5r.js";
|
|
3
3
|
function sendToEditor(msg) {
|
|
4
4
|
window.parent.postMessage(cloneForPostMessage(msg), "*");
|
|
5
5
|
}
|
|
@@ -534,6 +534,7 @@ function collectBloxSeo(registry2) {
|
|
|
534
534
|
if (v.ogType) registry2.seo.ogType = v.ogType;
|
|
535
535
|
if (v.noindex !== void 0) registry2.seo.noindex = v.noindex;
|
|
536
536
|
if (v.alternates !== void 0) registry2.seo.alternates = v.alternates;
|
|
537
|
+
if (v.structuredData !== void 0) registry2.seo.structuredData = v.structuredData;
|
|
537
538
|
}
|
|
538
539
|
return registry2.seo;
|
|
539
540
|
}
|
|
@@ -917,7 +918,7 @@ class BloxInstance {
|
|
|
917
918
|
router.addRoute({
|
|
918
919
|
path: "/_blox_preview",
|
|
919
920
|
name: BLOX_PREVIEW_ROUTE_NAME,
|
|
920
|
-
component: () => Promise.resolve().then(() => require("./PreviewApp-
|
|
921
|
+
component: () => Promise.resolve().then(() => require("./PreviewApp-Kb3uTwtH.cjs")),
|
|
921
922
|
beforeEnter: () => typeof window === "undefined" || window.parent !== window ? true : "/"
|
|
922
923
|
});
|
|
923
924
|
}
|
|
@@ -533,6 +533,7 @@ function collectBloxSeo(registry2) {
|
|
|
533
533
|
if (v.ogType) registry2.seo.ogType = v.ogType;
|
|
534
534
|
if (v.noindex !== void 0) registry2.seo.noindex = v.noindex;
|
|
535
535
|
if (v.alternates !== void 0) registry2.seo.alternates = v.alternates;
|
|
536
|
+
if (v.structuredData !== void 0) registry2.seo.structuredData = v.structuredData;
|
|
536
537
|
}
|
|
537
538
|
return registry2.seo;
|
|
538
539
|
}
|
|
@@ -916,7 +917,7 @@ class BloxInstance {
|
|
|
916
917
|
router.addRoute({
|
|
917
918
|
path: "/_blox_preview",
|
|
918
919
|
name: BLOX_PREVIEW_ROUTE_NAME,
|
|
919
|
-
component: () => import("./PreviewApp-
|
|
920
|
+
component: () => import("./PreviewApp-BKrLRDBC.js"),
|
|
920
921
|
beforeEnter: () => typeof window === "undefined" || window.parent !== window ? true : "/"
|
|
921
922
|
});
|
|
922
923
|
}
|
package/dist/data/useData.d.ts
CHANGED
|
@@ -28,6 +28,14 @@ export interface BloxSeoHead {
|
|
|
28
28
|
* instead. Emitted by `buildPageHead` when present.
|
|
29
29
|
*/
|
|
30
30
|
alternates?: Record<string, string>;
|
|
31
|
+
/**
|
|
32
|
+
* Extra JSON-LD graphs contributed by the block — one object or an array of
|
|
33
|
+
* objects (e.g. `FAQPage` parsed from the article body). Each is emitted as
|
|
34
|
+
* its own `<script type="application/ld+json">` in the prerendered head.
|
|
35
|
+
* Article/Product/Event are derived automatically; use this only for graphs
|
|
36
|
+
* the standard builder can't infer.
|
|
37
|
+
*/
|
|
38
|
+
structuredData?: Record<string, unknown> | Array<Record<string, unknown>>;
|
|
31
39
|
}
|
|
32
40
|
export interface BloxDataRegistry {
|
|
33
41
|
/** Resolved values collected during SSR, serialized into the payload. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useData.d.ts","sourceRoot":"","sources":["../../src/data/useData.ts"],"names":[],"mappings":"AAAA;;;;;;;;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,EAAE,IAAI,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,gBAAgB,CAa3F;AAeD,8EAA8E;AAC9E,wBAAgB,eAAe,IAAI,gBAAgB,GAAG,IAAI,CAEzD;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEnF;AAED;;;;;;;;GAQG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAAE,MAAM,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAiBzE;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,gBAAgB,GAAG,WAAW,CAgBtE;AAED;;;;;;;GAOG;AACH,wBAAgB,OAAO,CAAC,CAAC,EACxB,GAAG,EAAE,gBAAgB,CAAC,MAAM,CAAC,EAC7B,OAAO,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACzB,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC,GACxB,aAAa,CAAC,CAAC,CAAC,CAqFlB"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const index = require("./index-DUjEj7ts.cjs");
|
|
4
|
-
const PreviewApp_vue_vue_type_style_index_0_lang = require("./PreviewApp.vue_vue_type_style_index_0_lang-
|
|
5
|
-
const appRuntime = require("./appRuntime-
|
|
4
|
+
const PreviewApp_vue_vue_type_style_index_0_lang = require("./PreviewApp.vue_vue_type_style_index_0_lang-AC3W0NSJ.cjs");
|
|
5
|
+
const appRuntime = require("./appRuntime-BU2Ls-Y7.cjs");
|
|
6
6
|
const vue = require("vue");
|
|
7
7
|
const ssg_client = require("./client-AoDTJJXJ.cjs");
|
|
8
8
|
const vueRouter = require("vue-router");
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useBloxApi, getItemBySlug, getItemById, provideBloxApi } from "./index-I81QTzv-.js";
|
|
2
2
|
import { configureApi, createBloxApi, getCollectionResolver, getWebsiteId, getWebsiteIdSync, listItems, resolvePath, setApiOrigin, setCollectionResolver } from "./index-I81QTzv-.js";
|
|
3
|
-
import { _, P, s, a } from "./PreviewApp.vue_vue_type_style_index_0_lang-
|
|
4
|
-
import { f as BLOX_LOCALE_STRATEGY_KEY, u as useLocale, n as normalizeLink, e as BLOX_RUNTIME_KEY, g as useSeo, h as getRegistryData, j as getContentRoute, p as provideBloxData, b as provideBloxLocale, i as installBloxRuntime, s as setActiveLocale, k as isMissingPageDocument, l as installSmartLinks, m as consumePendingLocaleSwitch, o as BLOX_CMS_ROUTE_NAME, q as BLOX_PREVIEW_ROUTE_NAME } from "./appRuntime-
|
|
5
|
-
import { _ as _2, t, v, w, x, y, z, A, C, P as P2, D, E, c, a as a2, F, G, H, I, J, K, L, M, N, O, Q, r, R, S, T, U } from "./appRuntime-
|
|
3
|
+
import { _, P, s, a } from "./PreviewApp.vue_vue_type_style_index_0_lang-BMGv1eSR.js";
|
|
4
|
+
import { f as BLOX_LOCALE_STRATEGY_KEY, u as useLocale, n as normalizeLink, e as BLOX_RUNTIME_KEY, g as useSeo, h as getRegistryData, j as getContentRoute, p as provideBloxData, b as provideBloxLocale, i as installBloxRuntime, s as setActiveLocale, k as isMissingPageDocument, l as installSmartLinks, m as consumePendingLocaleSwitch, o as BLOX_CMS_ROUTE_NAME, q as BLOX_PREVIEW_ROUTE_NAME } from "./appRuntime-CWlPH_5r.js";
|
|
5
|
+
import { _ as _2, t, v, w, x, y, z, A, C, P as P2, D, E, c, a as a2, F, G, H, I, J, K, L, M, N, O, Q, r, R, S, T, U } from "./appRuntime-CWlPH_5r.js";
|
|
6
6
|
import { defineComponent, resolveComponent, openBlock, createBlock, withCtx, Transition, resolveDynamicComponent, inject, ref, watch, onMounted, onUnmounted, computed, onServerPrefetch, toValue, h, Suspense, createSSRApp, createApp } from "vue";
|
|
7
7
|
import { r as readBloxHydration } from "./client-Ce9fRCGH.js";
|
|
8
8
|
import { useRouter, useRoute } from "vue-router";
|
|
@@ -2,7 +2,7 @@ import { spawn } from "node:child_process";
|
|
|
2
2
|
import os from "node:os";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import process from "node:process";
|
|
5
|
-
import { f as fetchCmsSiteData, g as generateSitemapArtifacts } from "./validate-output-
|
|
5
|
+
import { f as fetchCmsSiteData, g as generateSitemapArtifacts } from "./validate-output-7_TqMVLs.js";
|
|
6
6
|
const AUTO_SHARD_CAP = Number(process.env.BLOX_SSG_SHARD_CAP) || 6;
|
|
7
7
|
const PREFETCH_BUDGET = Number(process.env.BLOX_SSG_PREFETCH_BUDGET) || 24;
|
|
8
8
|
const SEQUENTIAL_SHARDS = process.env.BLOX_SSG_SEQUENTIAL === "1";
|
|
@@ -142,7 +142,7 @@ async function runSharded(opts) {
|
|
|
142
142
|
}
|
|
143
143
|
if (process.env.BLOX_SSG_LLM !== "0") {
|
|
144
144
|
try {
|
|
145
|
-
const { mergeLlmParts } = await import("./validate-output-
|
|
145
|
+
const { mergeLlmParts } = await import("./validate-output-7_TqMVLs.js").then((n) => n.C);
|
|
146
146
|
const mergeWebsite = website;
|
|
147
147
|
const partFiles = Array.from({ length: total }, (_, i) => path.join(llmPartsDir, `part.${i}.json`));
|
|
148
148
|
const { pages } = await mergeLlmParts({
|
|
@@ -26,7 +26,7 @@ const node_child_process = require("node:child_process");
|
|
|
26
26
|
const os = require("node:os");
|
|
27
27
|
const path = require("node:path");
|
|
28
28
|
const process = require("node:process");
|
|
29
|
-
const llmArtifacts = require("./validate-output-
|
|
29
|
+
const llmArtifacts = require("./validate-output-CzSMiLrL.cjs");
|
|
30
30
|
const AUTO_SHARD_CAP = Number(process.env.BLOX_SSG_SHARD_CAP) || 6;
|
|
31
31
|
const PREFETCH_BUDGET = Number(process.env.BLOX_SSG_PREFETCH_BUDGET) || 24;
|
|
32
32
|
const SEQUENTIAL_SHARDS = process.env.BLOX_SSG_SEQUENTIAL === "1";
|
|
@@ -166,7 +166,7 @@ async function runSharded(opts) {
|
|
|
166
166
|
}
|
|
167
167
|
if (process.env.BLOX_SSG_LLM !== "0") {
|
|
168
168
|
try {
|
|
169
|
-
const { mergeLlmParts } = await Promise.resolve().then(() => require("./validate-output-
|
|
169
|
+
const { mergeLlmParts } = await Promise.resolve().then(() => require("./validate-output-CzSMiLrL.cjs")).then((n) => n.llmArtifacts);
|
|
170
170
|
const mergeWebsite = website;
|
|
171
171
|
const partFiles = Array.from({ length: total }, (_, i) => path.join(llmPartsDir, `part.${i}.json`));
|
|
172
172
|
const { pages } = await mergeLlmParts({
|
package/dist/ssg/cli.cjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const process = require("node:process");
|
|
4
4
|
const fs = require("node:fs/promises");
|
|
5
5
|
const ssg_buildGrant = require("./build-grant.cjs");
|
|
6
|
-
const llmArtifacts = require("../validate-output-
|
|
6
|
+
const llmArtifacts = require("../validate-output-CzSMiLrL.cjs");
|
|
7
7
|
function installFetchTimeout() {
|
|
8
8
|
const ms = Number(process.env.BLOX_SSG_FETCH_TIMEOUT_MS) || 2e4;
|
|
9
9
|
const original = globalThis.fetch;
|
|
@@ -147,7 +147,7 @@ Environment:
|
|
|
147
147
|
if (shardsOpt !== null || routesCmd) {
|
|
148
148
|
const { apiBase: apiBase2, websiteName: configWebsiteName2 } = await resolveApiBase(mode);
|
|
149
149
|
const websiteName2 = process.env.WEBSITE_NAME ?? configWebsiteName2 ?? "default";
|
|
150
|
-
const { runSharded } = await Promise.resolve().then(() => require("../shard-runner-
|
|
150
|
+
const { runSharded } = await Promise.resolve().then(() => require("../shard-runner-kRQWqGVy.cjs"));
|
|
151
151
|
const code = await runSharded({
|
|
152
152
|
shards: shardsOpt ?? "auto",
|
|
153
153
|
mode,
|
package/dist/ssg/cli.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import process from "node:process";
|
|
3
3
|
import fs from "node:fs/promises";
|
|
4
4
|
import { resolveBloxBuildGrant } from "./build-grant.mjs";
|
|
5
|
-
import { v as validateSsgOutput, u as uploadBloxManifest, p as polyfillBloxSsgGlobals, f as fetchCmsSiteData, b as buildCollectionResolver, a as prerender, c as validateInternalLinks } from "../validate-output-
|
|
5
|
+
import { v as validateSsgOutput, u as uploadBloxManifest, p as polyfillBloxSsgGlobals, f as fetchCmsSiteData, b as buildCollectionResolver, a as prerender, c as validateInternalLinks } from "../validate-output-7_TqMVLs.js";
|
|
6
6
|
function installFetchTimeout() {
|
|
7
7
|
const ms = Number(process.env.BLOX_SSG_FETCH_TIMEOUT_MS) || 2e4;
|
|
8
8
|
const original = globalThis.fetch;
|
|
@@ -146,7 +146,7 @@ Environment:
|
|
|
146
146
|
if (shardsOpt !== null || routesCmd) {
|
|
147
147
|
const { apiBase: apiBase2, websiteName: configWebsiteName2 } = await resolveApiBase(mode);
|
|
148
148
|
const websiteName2 = process.env.WEBSITE_NAME ?? configWebsiteName2 ?? "default";
|
|
149
|
-
const { runSharded } = await import("../shard-runner-
|
|
149
|
+
const { runSharded } = await import("../shard-runner-LgGSa4zZ.js");
|
|
150
150
|
const code = await runSharded({
|
|
151
151
|
shards: shardsOpt ?? "auto",
|
|
152
152
|
mode,
|
package/dist/ssg/index.cjs
CHANGED
|
@@ -22,11 +22,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
22
22
|
mod
|
|
23
23
|
));
|
|
24
24
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
25
|
-
const llmArtifacts = require("../validate-output-
|
|
25
|
+
const llmArtifacts = require("../validate-output-CzSMiLrL.cjs");
|
|
26
26
|
const ssg_buildGrant = require("./build-grant.cjs");
|
|
27
27
|
const ssg_client = require("../client-AoDTJJXJ.cjs");
|
|
28
28
|
const vue = require("vue");
|
|
29
|
-
const appRuntime = require("../appRuntime-
|
|
29
|
+
const appRuntime = require("../appRuntime-BU2Ls-Y7.cjs");
|
|
30
30
|
const index = require("../index-DUjEj7ts.cjs");
|
|
31
31
|
async function renderBloxSsgPage(options) {
|
|
32
32
|
var _a, _b, _c, _d;
|
|
@@ -91,7 +91,8 @@ async function renderBloxSsgPage(options) {
|
|
|
91
91
|
website,
|
|
92
92
|
contextKey: primary == null ? void 0 : primary.key,
|
|
93
93
|
context: primary == null ? void 0 : primary.ctx,
|
|
94
|
-
config: llm
|
|
94
|
+
config: llm,
|
|
95
|
+
override: seoOverride
|
|
95
96
|
});
|
|
96
97
|
if (jsonLd) head += `
|
|
97
98
|
${jsonLd}`;
|
package/dist/ssg/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { d as buildPageHead, e as primaryContextEntry, h as buildJsonLd, i as extractPageText, B as BloxBuildResponseError, j as bloxBuildJson } from "../validate-output-
|
|
2
|
-
import { k, l, f, m, n, o, q, g, r, s, t, w, x, y, p, a, z, A, u, c, v } from "../validate-output-
|
|
1
|
+
import { d as buildPageHead, e as primaryContextEntry, h as buildJsonLd, i as extractPageText, B as BloxBuildResponseError, j as bloxBuildJson } from "../validate-output-7_TqMVLs.js";
|
|
2
|
+
import { k, l, f, m, n, o, q, g, r, s, t, w, x, y, p, a, z, A, u, c, v } from "../validate-output-7_TqMVLs.js";
|
|
3
3
|
import { parseBloxBuildGrantBody, resolveBloxBuildGrant } from "./build-grant.mjs";
|
|
4
4
|
import { a as BLOX_HYDRATION_WINDOW_KEY } from "../client-Ce9fRCGH.js";
|
|
5
5
|
import { createSSRApp, h, Suspense } from "vue";
|
|
6
|
-
import { c as collectBloxData, a as collectBloxSeo, p as provideBloxData, b as provideBloxLocale, B as BLOX_SSR_ROUTE_STATE_KEY, i as installBloxRuntime, s as setActiveLocale } from "../appRuntime-
|
|
6
|
+
import { c as collectBloxData, a as collectBloxSeo, p as provideBloxData, b as provideBloxLocale, B as BLOX_SSR_ROUTE_STATE_KEY, i as installBloxRuntime, s as setActiveLocale } from "../appRuntime-CWlPH_5r.js";
|
|
7
7
|
import { provideBloxApi, getCollectionResolver } from "../index-I81QTzv-.js";
|
|
8
8
|
async function renderBloxSsgPage(options) {
|
|
9
9
|
var _a, _b, _c, _d;
|
|
@@ -68,7 +68,8 @@ async function renderBloxSsgPage(options) {
|
|
|
68
68
|
website,
|
|
69
69
|
contextKey: primary == null ? void 0 : primary.key,
|
|
70
70
|
context: primary == null ? void 0 : primary.ctx,
|
|
71
|
-
config: llm
|
|
71
|
+
config: llm,
|
|
72
|
+
override: seoOverride
|
|
72
73
|
});
|
|
73
74
|
if (jsonLd) head += `
|
|
74
75
|
${jsonLd}`;
|
|
@@ -62,6 +62,21 @@ export declare function buildJsonLd(options: {
|
|
|
62
62
|
context?: Record<string, unknown>;
|
|
63
63
|
locale?: string;
|
|
64
64
|
config?: LlmArtifactsConfig;
|
|
65
|
+
/**
|
|
66
|
+
* Per-page SEO override contributed by a block via `useSeo()` — evaluated
|
|
67
|
+
* post-render, so it holds the resolved detail-page values. Wins over the
|
|
68
|
+
* bound context: `ogType: 'article'` types the entity as Article, and
|
|
69
|
+
* `publishedTime`/`modifiedTime`/`author`/`image` fill its fields.
|
|
70
|
+
*/
|
|
71
|
+
override?: {
|
|
72
|
+
title?: string;
|
|
73
|
+
description?: string;
|
|
74
|
+
image?: string;
|
|
75
|
+
publishedTime?: string;
|
|
76
|
+
modifiedTime?: string;
|
|
77
|
+
author?: string;
|
|
78
|
+
ogType?: string;
|
|
79
|
+
};
|
|
65
80
|
}): string;
|
|
66
81
|
/**
|
|
67
82
|
* Generate a spec-style `llms.txt`: an H1 site name, a blockquote summary,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llm-artifacts.d.ts","sourceRoot":"","sources":["../../src/ssg/llm-artifacts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAMzD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QAAQ,EAAE,gBAAgB,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACrE,sEAAsE;IACtE,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,gBAAgB,KAAK,WAAW,CAAA;IACxD;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,8EAA8E;IAC9E,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,+EAA+E;IAC/E,OAAO,CAAC,EAAE,WAAW,GAAG,IAAI,CAAA;IAC5B,yEAAyE;IACzE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,8EAA8E;IAC9E,GAAG,CAAC,EAAE,kBAAkB,CAAA;CACxB,GAAG,OAAO,CAAC;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAClC,GAAG,CAAC,EAAE,YAAY,CAAA;CAClB,CAAC,CA8GD;AAED,yFAAyF;AACzF,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAE/C"}
|
package/dist/ssg/seo.d.ts
CHANGED
|
@@ -9,8 +9,11 @@ export interface SeoPageData {
|
|
|
9
9
|
* Resolve the JSON-LD structured data for a given locale.
|
|
10
10
|
* Prefers `structured_data.org_by_locale[locale]` then falls back to the
|
|
11
11
|
* site-wide `structured_data.org`. Returns a serialized `<script>` tag or ''.
|
|
12
|
+
*
|
|
13
|
+
* `base` (canonical site origin) makes root-relative `url`/`@id`/`image`
|
|
14
|
+
* values absolute — CMS-authored graphs stay portable across environments.
|
|
12
15
|
*/
|
|
13
|
-
export declare function buildStructuredData(sd: StructuredData | Record<string, unknown> | null | undefined, locale?: string): string;
|
|
16
|
+
export declare function buildStructuredData(sd: StructuredData | Record<string, unknown> | null | undefined, locale?: string, base?: string): string;
|
|
14
17
|
export interface RedirectEntry {
|
|
15
18
|
from_path: string;
|
|
16
19
|
to_path: string;
|
|
@@ -46,6 +49,7 @@ export declare function buildPageHead(options: {
|
|
|
46
49
|
ogType?: string;
|
|
47
50
|
noindex?: boolean;
|
|
48
51
|
alternates?: Record<string, string>;
|
|
52
|
+
structuredData?: Record<string, unknown> | Array<Record<string, unknown>>;
|
|
49
53
|
};
|
|
50
54
|
/**
|
|
51
55
|
* Absolute origin resolved at build time (deploy URL / configured origin),
|
package/dist/ssg/seo.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seo.d.ts","sourceRoot":"","sources":["../../src/ssg/seo.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAOzE,4DAA4D;AAC5D,MAAM,WAAW,WAAW;IAC3B,IAAI,EAAE,QAAQ,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC,CAAA;CACzD;
|
|
1
|
+
{"version":3,"file":"seo.d.ts","sourceRoot":"","sources":["../../src/ssg/seo.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAOzE,4DAA4D;AAC5D,MAAM,WAAW,WAAW;IAC3B,IAAI,EAAE,QAAQ,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC,CAAA;CACzD;AAwBD;;;;;;;GAOG;AACH,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
|
|
|
369
369
|
g.window.location = _win.location;
|
|
370
370
|
g.window.document = _win.document;
|
|
371
371
|
}
|
|
372
|
-
|
|
372
|
+
const URL_KEYS = /* @__PURE__ */ new Set(["url", "image", "logo", "@id"]);
|
|
373
|
+
function absolutizeJsonLd(value, base) {
|
|
374
|
+
if (!base) return value;
|
|
375
|
+
if (Array.isArray(value)) return value.map((entry) => absolutizeJsonLd(entry, base));
|
|
376
|
+
if (!value || typeof value !== "object") return value;
|
|
377
|
+
const out = {};
|
|
378
|
+
for (const [key, entry] of Object.entries(value)) {
|
|
379
|
+
if (key !== "@context" && typeof entry === "string" && URL_KEYS.has(key) && entry.startsWith("/")) {
|
|
380
|
+
out[key] = base + entry;
|
|
381
|
+
continue;
|
|
382
|
+
}
|
|
383
|
+
out[key] = absolutizeJsonLd(entry, base);
|
|
384
|
+
}
|
|
385
|
+
return out;
|
|
386
|
+
}
|
|
387
|
+
function buildStructuredData(sd, locale, base) {
|
|
373
388
|
var _a;
|
|
374
389
|
if (!sd) return "";
|
|
375
390
|
const siteData = "org" in sd || "org_by_locale" in sd;
|
|
@@ -377,8 +392,8 @@ function buildStructuredData(sd, locale) {
|
|
|
377
392
|
const value = siteData ? perLocale ?? sd.org : sd;
|
|
378
393
|
if (value == null || typeof value === "string" && value === "") return "";
|
|
379
394
|
try {
|
|
380
|
-
const
|
|
381
|
-
return `<script type="application/ld+json">${
|
|
395
|
+
const resolved = typeof value === "string" ? value : JSON.stringify(absolutizeJsonLd(value, base ?? ""));
|
|
396
|
+
return `<script type="application/ld+json">${resolved}${"<"}/script>`;
|
|
382
397
|
} catch {
|
|
383
398
|
return "";
|
|
384
399
|
}
|
|
@@ -450,10 +465,23 @@ function buildPageHead(options) {
|
|
|
450
465
|
if (seo.noindex || (page == null ? void 0 : page.noindex) || (override == null ? void 0 : override.noindex)) {
|
|
451
466
|
parts.push('<meta name="robots" content="noindex, nofollow">');
|
|
452
467
|
}
|
|
453
|
-
const structuredData = buildStructuredData(
|
|
468
|
+
const structuredData = buildStructuredData(
|
|
469
|
+
website == null ? void 0 : website.structured_data,
|
|
470
|
+
locale || (website == null ? void 0 : website.default_locale),
|
|
471
|
+
canonicalBase
|
|
472
|
+
);
|
|
454
473
|
if (structuredData) parts.push(structuredData);
|
|
455
|
-
const pageStructuredData = buildStructuredData(
|
|
474
|
+
const pageStructuredData = buildStructuredData(
|
|
475
|
+
page == null ? void 0 : page.structured_data,
|
|
476
|
+
locale || (website == null ? void 0 : website.default_locale),
|
|
477
|
+
canonicalBase
|
|
478
|
+
);
|
|
456
479
|
if (pageStructuredData) parts.push(pageStructuredData);
|
|
480
|
+
for (const graph of Array.isArray(override == null ? void 0 : override.structuredData) ? override.structuredData : (override == null ? void 0 : override.structuredData) ? [override.structuredData] : []) {
|
|
481
|
+
if (!graph || typeof graph !== "object") continue;
|
|
482
|
+
const resolved = absolutizeJsonLd(graph, canonicalBase);
|
|
483
|
+
parts.push(`<script type="application/ld+json">${JSON.stringify(resolved)}${"<"}/script>`);
|
|
484
|
+
}
|
|
457
485
|
if (stateScript) {
|
|
458
486
|
parts.push(stateScript);
|
|
459
487
|
}
|
|
@@ -674,6 +702,12 @@ function typeFromContextKey(key) {
|
|
|
674
702
|
if (/(event|session|webinar)/.test(k)) return "Event";
|
|
675
703
|
return "WebPage";
|
|
676
704
|
}
|
|
705
|
+
function absImage(url, base) {
|
|
706
|
+
if (!url) return void 0;
|
|
707
|
+
if (/^https?:\/\//i.test(url)) return url;
|
|
708
|
+
if (!base) return url;
|
|
709
|
+
return base + (url.startsWith("/") ? url : `/${url}`);
|
|
710
|
+
}
|
|
677
711
|
function str(o, ...keys) {
|
|
678
712
|
for (const key of keys) {
|
|
679
713
|
const v = o[key];
|
|
@@ -699,14 +733,16 @@ function breadcrumbList(url, base, siteName) {
|
|
|
699
733
|
return { "@context": "https://schema.org", "@type": "BreadcrumbList", "itemListElement": items };
|
|
700
734
|
}
|
|
701
735
|
function buildJsonLd(options) {
|
|
702
|
-
var _a;
|
|
703
|
-
const { url, page, website, contextKey, context, config } = options;
|
|
736
|
+
var _a, _b, _c;
|
|
737
|
+
const { url, page, website, contextKey, context, config, override } = options;
|
|
704
738
|
const seo = (website == null ? void 0 : website.seo) ?? {};
|
|
705
739
|
const base = (seo.canonical_base_url || (website == null ? void 0 : website.domain) || "").replace(/\/$/, "");
|
|
706
740
|
const siteName = seo.site_name || void 0;
|
|
707
741
|
const pageUrl = base ? base + url : url;
|
|
708
|
-
const
|
|
709
|
-
const
|
|
742
|
+
const orgLogo = (_b = (_a = website == null ? void 0 : website.structured_data) == null ? void 0 : _a.org) == null ? void 0 : _b.logo;
|
|
743
|
+
const logo = typeof orgLogo === "string" && orgLogo || seo.default_og_image || void 0;
|
|
744
|
+
const title = (override == null ? void 0 : override.title) || (page == null ? void 0 : page.meta_title) || (page == null ? void 0 : page.title) || str(context ?? {}, "meta_title", "title") || seo.default_meta_title;
|
|
745
|
+
const description = (override == null ? void 0 : override.description) || (page == null ? void 0 : page.meta_description) || str(context ?? {}, "meta_description", "excerpt", "description", "summary") || seo.default_meta_description;
|
|
710
746
|
const graphs = [];
|
|
711
747
|
const webPage = { "@context": "https://schema.org", "@type": "WebPage", "url": pageUrl };
|
|
712
748
|
if (title) webPage.name = title;
|
|
@@ -714,41 +750,50 @@ function buildJsonLd(options) {
|
|
|
714
750
|
if (siteName) webPage.isPartOf = { "@type": "WebSite", "name": siteName, "url": base || void 0 };
|
|
715
751
|
graphs.push(webPage);
|
|
716
752
|
if (url && url !== "/") graphs.push(breadcrumbList(url, base, siteName));
|
|
717
|
-
|
|
718
|
-
|
|
753
|
+
const declaredArticle = (override == null ? void 0 : override.ogType) === "article";
|
|
754
|
+
if (contextKey && context || declaredArticle) {
|
|
755
|
+
const row = context ?? {};
|
|
756
|
+
const type = declaredArticle ? "Article" : ((_c = config == null ? void 0 : config.typeMap) == null ? void 0 : _c[contextKey]) || typeFromContextKey(contextKey);
|
|
719
757
|
const entity = { "@context": "https://schema.org", "@type": type, "url": pageUrl };
|
|
720
|
-
const name = str(
|
|
721
|
-
const desc = str(
|
|
722
|
-
const image = str(
|
|
758
|
+
const name = (override == null ? void 0 : override.title) || str(row, "title", "name", "meta_title");
|
|
759
|
+
const desc = (override == null ? void 0 : override.description) || str(row, "meta_description", "excerpt", "description", "summary", "blurb");
|
|
760
|
+
const image = absImage((override == null ? void 0 : override.image) || str(row, "og_image", "cover_image_url", "image_url", "image"), base);
|
|
723
761
|
if (name) entity.name = name;
|
|
724
762
|
if (desc) entity.description = desc;
|
|
725
763
|
if (image) entity.image = image;
|
|
726
764
|
if (type === "Article") {
|
|
727
|
-
if (siteName)
|
|
728
|
-
|
|
765
|
+
if (siteName) {
|
|
766
|
+
entity.publisher = {
|
|
767
|
+
"@type": "Organization",
|
|
768
|
+
"name": siteName,
|
|
769
|
+
...logo ? { "logo": { "@type": "ImageObject", "url": logo } } : {}
|
|
770
|
+
};
|
|
771
|
+
}
|
|
772
|
+
const date = (override == null ? void 0 : override.publishedTime) || str(row, "published_at", "publishDate", "created_at", "date");
|
|
729
773
|
if (date) entity.datePublished = date;
|
|
730
|
-
const upd = str(
|
|
774
|
+
const upd = (override == null ? void 0 : override.modifiedTime) || str(row, "updated_at", "modified_at");
|
|
731
775
|
if (upd) entity.dateModified = upd;
|
|
732
|
-
const author = str(
|
|
776
|
+
const author = (override == null ? void 0 : override.author) || str(row, "author", "author_name");
|
|
733
777
|
if (author) entity.author = { "@type": "Person", "name": author };
|
|
734
778
|
if (name) {
|
|
735
779
|
entity.headline = name;
|
|
736
780
|
delete entity.name;
|
|
737
781
|
}
|
|
782
|
+
entity.mainEntityOfPage = { "@type": "WebPage", "@id": pageUrl };
|
|
738
783
|
} else if (type === "Product") {
|
|
739
|
-
const price = str(
|
|
740
|
-
const currency = str(
|
|
784
|
+
const price = str(row, "price", "amount");
|
|
785
|
+
const currency = str(row, "currency", "currency_code") || "USD";
|
|
741
786
|
if (price) {
|
|
742
787
|
entity.offers = { "@type": "Offer", "price": price, "priceCurrency": currency, "url": pageUrl };
|
|
743
788
|
}
|
|
744
|
-
const sku = str(
|
|
789
|
+
const sku = str(row, "sku", "id");
|
|
745
790
|
if (sku) entity.sku = sku;
|
|
746
791
|
} else if (type === "Event") {
|
|
747
|
-
const start = str(
|
|
748
|
-
const end = str(
|
|
792
|
+
const start = str(row, "start_at", "starts_at", "start_date", "date");
|
|
793
|
+
const end = str(row, "end_at", "ends_at", "end_date");
|
|
749
794
|
if (start) entity.startDate = start;
|
|
750
795
|
if (end) entity.endDate = end;
|
|
751
|
-
const loc = str(
|
|
796
|
+
const loc = str(row, "location", "venue", "address");
|
|
752
797
|
if (loc) entity.location = { "@type": "Place", "name": loc };
|
|
753
798
|
}
|
|
754
799
|
graphs.push(entity);
|
|
@@ -392,7 +392,22 @@ async function polyfillBloxSsgGlobals(options) {
|
|
|
392
392
|
g.window.location = _win.location;
|
|
393
393
|
g.window.document = _win.document;
|
|
394
394
|
}
|
|
395
|
-
|
|
395
|
+
const URL_KEYS = /* @__PURE__ */ new Set(["url", "image", "logo", "@id"]);
|
|
396
|
+
function absolutizeJsonLd(value, base) {
|
|
397
|
+
if (!base) return value;
|
|
398
|
+
if (Array.isArray(value)) return value.map((entry) => absolutizeJsonLd(entry, base));
|
|
399
|
+
if (!value || typeof value !== "object") return value;
|
|
400
|
+
const out = {};
|
|
401
|
+
for (const [key, entry] of Object.entries(value)) {
|
|
402
|
+
if (key !== "@context" && typeof entry === "string" && URL_KEYS.has(key) && entry.startsWith("/")) {
|
|
403
|
+
out[key] = base + entry;
|
|
404
|
+
continue;
|
|
405
|
+
}
|
|
406
|
+
out[key] = absolutizeJsonLd(entry, base);
|
|
407
|
+
}
|
|
408
|
+
return out;
|
|
409
|
+
}
|
|
410
|
+
function buildStructuredData(sd, locale, base) {
|
|
396
411
|
var _a;
|
|
397
412
|
if (!sd) return "";
|
|
398
413
|
const siteData = "org" in sd || "org_by_locale" in sd;
|
|
@@ -400,8 +415,8 @@ function buildStructuredData(sd, locale) {
|
|
|
400
415
|
const value = siteData ? perLocale ?? sd.org : sd;
|
|
401
416
|
if (value == null || typeof value === "string" && value === "") return "";
|
|
402
417
|
try {
|
|
403
|
-
const
|
|
404
|
-
return `<script type="application/ld+json">${
|
|
418
|
+
const resolved = typeof value === "string" ? value : JSON.stringify(absolutizeJsonLd(value, base ?? ""));
|
|
419
|
+
return `<script type="application/ld+json">${resolved}${"<"}/script>`;
|
|
405
420
|
} catch {
|
|
406
421
|
return "";
|
|
407
422
|
}
|
|
@@ -473,10 +488,23 @@ function buildPageHead(options) {
|
|
|
473
488
|
if (seo.noindex || (page == null ? void 0 : page.noindex) || (override == null ? void 0 : override.noindex)) {
|
|
474
489
|
parts.push('<meta name="robots" content="noindex, nofollow">');
|
|
475
490
|
}
|
|
476
|
-
const structuredData = buildStructuredData(
|
|
491
|
+
const structuredData = buildStructuredData(
|
|
492
|
+
website == null ? void 0 : website.structured_data,
|
|
493
|
+
locale || (website == null ? void 0 : website.default_locale),
|
|
494
|
+
canonicalBase
|
|
495
|
+
);
|
|
477
496
|
if (structuredData) parts.push(structuredData);
|
|
478
|
-
const pageStructuredData = buildStructuredData(
|
|
497
|
+
const pageStructuredData = buildStructuredData(
|
|
498
|
+
page == null ? void 0 : page.structured_data,
|
|
499
|
+
locale || (website == null ? void 0 : website.default_locale),
|
|
500
|
+
canonicalBase
|
|
501
|
+
);
|
|
479
502
|
if (pageStructuredData) parts.push(pageStructuredData);
|
|
503
|
+
for (const graph of Array.isArray(override == null ? void 0 : override.structuredData) ? override.structuredData : (override == null ? void 0 : override.structuredData) ? [override.structuredData] : []) {
|
|
504
|
+
if (!graph || typeof graph !== "object") continue;
|
|
505
|
+
const resolved = absolutizeJsonLd(graph, canonicalBase);
|
|
506
|
+
parts.push(`<script type="application/ld+json">${JSON.stringify(resolved)}${"<"}/script>`);
|
|
507
|
+
}
|
|
480
508
|
if (stateScript) {
|
|
481
509
|
parts.push(stateScript);
|
|
482
510
|
}
|
|
@@ -697,6 +725,12 @@ function typeFromContextKey(key) {
|
|
|
697
725
|
if (/(event|session|webinar)/.test(k)) return "Event";
|
|
698
726
|
return "WebPage";
|
|
699
727
|
}
|
|
728
|
+
function absImage(url, base) {
|
|
729
|
+
if (!url) return void 0;
|
|
730
|
+
if (/^https?:\/\//i.test(url)) return url;
|
|
731
|
+
if (!base) return url;
|
|
732
|
+
return base + (url.startsWith("/") ? url : `/${url}`);
|
|
733
|
+
}
|
|
700
734
|
function str(o, ...keys) {
|
|
701
735
|
for (const key of keys) {
|
|
702
736
|
const v = o[key];
|
|
@@ -722,14 +756,16 @@ function breadcrumbList(url, base, siteName) {
|
|
|
722
756
|
return { "@context": "https://schema.org", "@type": "BreadcrumbList", "itemListElement": items };
|
|
723
757
|
}
|
|
724
758
|
function buildJsonLd(options) {
|
|
725
|
-
var _a;
|
|
726
|
-
const { url, page, website, contextKey, context, config } = options;
|
|
759
|
+
var _a, _b, _c;
|
|
760
|
+
const { url, page, website, contextKey, context, config, override } = options;
|
|
727
761
|
const seo = (website == null ? void 0 : website.seo) ?? {};
|
|
728
762
|
const base = (seo.canonical_base_url || (website == null ? void 0 : website.domain) || "").replace(/\/$/, "");
|
|
729
763
|
const siteName = seo.site_name || void 0;
|
|
730
764
|
const pageUrl = base ? base + url : url;
|
|
731
|
-
const
|
|
732
|
-
const
|
|
765
|
+
const orgLogo = (_b = (_a = website == null ? void 0 : website.structured_data) == null ? void 0 : _a.org) == null ? void 0 : _b.logo;
|
|
766
|
+
const logo = typeof orgLogo === "string" && orgLogo || seo.default_og_image || void 0;
|
|
767
|
+
const title = (override == null ? void 0 : override.title) || (page == null ? void 0 : page.meta_title) || (page == null ? void 0 : page.title) || str(context ?? {}, "meta_title", "title") || seo.default_meta_title;
|
|
768
|
+
const description = (override == null ? void 0 : override.description) || (page == null ? void 0 : page.meta_description) || str(context ?? {}, "meta_description", "excerpt", "description", "summary") || seo.default_meta_description;
|
|
733
769
|
const graphs = [];
|
|
734
770
|
const webPage = { "@context": "https://schema.org", "@type": "WebPage", "url": pageUrl };
|
|
735
771
|
if (title) webPage.name = title;
|
|
@@ -737,41 +773,50 @@ function buildJsonLd(options) {
|
|
|
737
773
|
if (siteName) webPage.isPartOf = { "@type": "WebSite", "name": siteName, "url": base || void 0 };
|
|
738
774
|
graphs.push(webPage);
|
|
739
775
|
if (url && url !== "/") graphs.push(breadcrumbList(url, base, siteName));
|
|
740
|
-
|
|
741
|
-
|
|
776
|
+
const declaredArticle = (override == null ? void 0 : override.ogType) === "article";
|
|
777
|
+
if (contextKey && context || declaredArticle) {
|
|
778
|
+
const row = context ?? {};
|
|
779
|
+
const type = declaredArticle ? "Article" : ((_c = config == null ? void 0 : config.typeMap) == null ? void 0 : _c[contextKey]) || typeFromContextKey(contextKey);
|
|
742
780
|
const entity = { "@context": "https://schema.org", "@type": type, "url": pageUrl };
|
|
743
|
-
const name = str(
|
|
744
|
-
const desc = str(
|
|
745
|
-
const image = str(
|
|
781
|
+
const name = (override == null ? void 0 : override.title) || str(row, "title", "name", "meta_title");
|
|
782
|
+
const desc = (override == null ? void 0 : override.description) || str(row, "meta_description", "excerpt", "description", "summary", "blurb");
|
|
783
|
+
const image = absImage((override == null ? void 0 : override.image) || str(row, "og_image", "cover_image_url", "image_url", "image"), base);
|
|
746
784
|
if (name) entity.name = name;
|
|
747
785
|
if (desc) entity.description = desc;
|
|
748
786
|
if (image) entity.image = image;
|
|
749
787
|
if (type === "Article") {
|
|
750
|
-
if (siteName)
|
|
751
|
-
|
|
788
|
+
if (siteName) {
|
|
789
|
+
entity.publisher = {
|
|
790
|
+
"@type": "Organization",
|
|
791
|
+
"name": siteName,
|
|
792
|
+
...logo ? { "logo": { "@type": "ImageObject", "url": logo } } : {}
|
|
793
|
+
};
|
|
794
|
+
}
|
|
795
|
+
const date = (override == null ? void 0 : override.publishedTime) || str(row, "published_at", "publishDate", "created_at", "date");
|
|
752
796
|
if (date) entity.datePublished = date;
|
|
753
|
-
const upd = str(
|
|
797
|
+
const upd = (override == null ? void 0 : override.modifiedTime) || str(row, "updated_at", "modified_at");
|
|
754
798
|
if (upd) entity.dateModified = upd;
|
|
755
|
-
const author = str(
|
|
799
|
+
const author = (override == null ? void 0 : override.author) || str(row, "author", "author_name");
|
|
756
800
|
if (author) entity.author = { "@type": "Person", "name": author };
|
|
757
801
|
if (name) {
|
|
758
802
|
entity.headline = name;
|
|
759
803
|
delete entity.name;
|
|
760
804
|
}
|
|
805
|
+
entity.mainEntityOfPage = { "@type": "WebPage", "@id": pageUrl };
|
|
761
806
|
} else if (type === "Product") {
|
|
762
|
-
const price = str(
|
|
763
|
-
const currency = str(
|
|
807
|
+
const price = str(row, "price", "amount");
|
|
808
|
+
const currency = str(row, "currency", "currency_code") || "USD";
|
|
764
809
|
if (price) {
|
|
765
810
|
entity.offers = { "@type": "Offer", "price": price, "priceCurrency": currency, "url": pageUrl };
|
|
766
811
|
}
|
|
767
|
-
const sku = str(
|
|
812
|
+
const sku = str(row, "sku", "id");
|
|
768
813
|
if (sku) entity.sku = sku;
|
|
769
814
|
} else if (type === "Event") {
|
|
770
|
-
const start = str(
|
|
771
|
-
const end = str(
|
|
815
|
+
const start = str(row, "start_at", "starts_at", "start_date", "date");
|
|
816
|
+
const end = str(row, "end_at", "ends_at", "end_date");
|
|
772
817
|
if (start) entity.startDate = start;
|
|
773
818
|
if (end) entity.endDate = end;
|
|
774
|
-
const loc = str(
|
|
819
|
+
const loc = str(row, "location", "venue", "address");
|
|
775
820
|
if (loc) entity.location = { "@type": "Place", "name": loc };
|
|
776
821
|
}
|
|
777
822
|
graphs.push(entity);
|
package/package.json
CHANGED