@bagelink/blox 1.15.670 → 1.15.672
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-C4JE4ywf.cjs → shard-runner-Ctxv1BCm.cjs} +2 -2
- package/dist/{shard-runner-CtJLkov_.js → shard-runner-DpVAhzsZ.js} +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-BdzD7fIN.cjs → validate-output-BTAIN5It.cjs} +77 -24
- package/dist/{validate-output-CgacFje9.js → validate-output-Cf8c6H-K.js} +77 -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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G,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";
|
|
@@ -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-BTAIN5It.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-BTAIN5It.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({
|
|
@@ -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-Cf8c6H-K.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-Cf8c6H-K.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({
|
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-BTAIN5It.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-Ctxv1BCm.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-Cf8c6H-K.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-DpVAhzsZ.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-BTAIN5It.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-Cf8c6H-K.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-Cf8c6H-K.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;AA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AC,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, pageUrl?: 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;AA+BD;;;;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
@@ -392,7 +392,28 @@ 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, pageUrl) {
|
|
397
|
+
if (!base) return value;
|
|
398
|
+
if (Array.isArray(value)) return value.map((entry) => absolutizeJsonLd(entry, base, pageUrl));
|
|
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)) {
|
|
403
|
+
if (entry.startsWith("#") && pageUrl) {
|
|
404
|
+
out[key] = pageUrl + entry;
|
|
405
|
+
continue;
|
|
406
|
+
}
|
|
407
|
+
if (entry.startsWith("/")) {
|
|
408
|
+
out[key] = base + entry;
|
|
409
|
+
continue;
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
out[key] = absolutizeJsonLd(entry, base, pageUrl);
|
|
413
|
+
}
|
|
414
|
+
return out;
|
|
415
|
+
}
|
|
416
|
+
function buildStructuredData(sd, locale, base, pageUrl) {
|
|
396
417
|
var _a;
|
|
397
418
|
if (!sd) return "";
|
|
398
419
|
const siteData = "org" in sd || "org_by_locale" in sd;
|
|
@@ -400,8 +421,8 @@ function buildStructuredData(sd, locale) {
|
|
|
400
421
|
const value = siteData ? perLocale ?? sd.org : sd;
|
|
401
422
|
if (value == null || typeof value === "string" && value === "") return "";
|
|
402
423
|
try {
|
|
403
|
-
const
|
|
404
|
-
return `<script type="application/ld+json">${
|
|
424
|
+
const resolved = typeof value === "string" ? value : JSON.stringify(absolutizeJsonLd(value, base ?? "", pageUrl));
|
|
425
|
+
return `<script type="application/ld+json">${resolved}${"<"}/script>`;
|
|
405
426
|
} catch {
|
|
406
427
|
return "";
|
|
407
428
|
}
|
|
@@ -473,10 +494,25 @@ function buildPageHead(options) {
|
|
|
473
494
|
if (seo.noindex || (page == null ? void 0 : page.noindex) || (override == null ? void 0 : override.noindex)) {
|
|
474
495
|
parts.push('<meta name="robots" content="noindex, nofollow">');
|
|
475
496
|
}
|
|
476
|
-
const structuredData = buildStructuredData(
|
|
497
|
+
const structuredData = buildStructuredData(
|
|
498
|
+
website == null ? void 0 : website.structured_data,
|
|
499
|
+
locale || (website == null ? void 0 : website.default_locale),
|
|
500
|
+
canonicalBase,
|
|
501
|
+
canonicalBase + url
|
|
502
|
+
);
|
|
477
503
|
if (structuredData) parts.push(structuredData);
|
|
478
|
-
const pageStructuredData = buildStructuredData(
|
|
504
|
+
const pageStructuredData = buildStructuredData(
|
|
505
|
+
page == null ? void 0 : page.structured_data,
|
|
506
|
+
locale || (website == null ? void 0 : website.default_locale),
|
|
507
|
+
canonicalBase,
|
|
508
|
+
canonicalBase + url
|
|
509
|
+
);
|
|
479
510
|
if (pageStructuredData) parts.push(pageStructuredData);
|
|
511
|
+
for (const graph of Array.isArray(override == null ? void 0 : override.structuredData) ? override.structuredData : (override == null ? void 0 : override.structuredData) ? [override.structuredData] : []) {
|
|
512
|
+
if (!graph || typeof graph !== "object") continue;
|
|
513
|
+
const resolved = absolutizeJsonLd(graph, canonicalBase, canonicalBase + url);
|
|
514
|
+
parts.push(`<script type="application/ld+json">${JSON.stringify(resolved)}${"<"}/script>`);
|
|
515
|
+
}
|
|
480
516
|
if (stateScript) {
|
|
481
517
|
parts.push(stateScript);
|
|
482
518
|
}
|
|
@@ -697,6 +733,12 @@ function typeFromContextKey(key) {
|
|
|
697
733
|
if (/(event|session|webinar)/.test(k)) return "Event";
|
|
698
734
|
return "WebPage";
|
|
699
735
|
}
|
|
736
|
+
function absImage(url, base) {
|
|
737
|
+
if (!url) return void 0;
|
|
738
|
+
if (/^https?:\/\//i.test(url)) return url;
|
|
739
|
+
if (!base) return url;
|
|
740
|
+
return base + (url.startsWith("/") ? url : `/${url}`);
|
|
741
|
+
}
|
|
700
742
|
function str(o, ...keys) {
|
|
701
743
|
for (const key of keys) {
|
|
702
744
|
const v = o[key];
|
|
@@ -722,14 +764,16 @@ function breadcrumbList(url, base, siteName) {
|
|
|
722
764
|
return { "@context": "https://schema.org", "@type": "BreadcrumbList", "itemListElement": items };
|
|
723
765
|
}
|
|
724
766
|
function buildJsonLd(options) {
|
|
725
|
-
var _a;
|
|
726
|
-
const { url, page, website, contextKey, context, config } = options;
|
|
767
|
+
var _a, _b, _c;
|
|
768
|
+
const { url, page, website, contextKey, context, config, override } = options;
|
|
727
769
|
const seo = (website == null ? void 0 : website.seo) ?? {};
|
|
728
770
|
const base = (seo.canonical_base_url || (website == null ? void 0 : website.domain) || "").replace(/\/$/, "");
|
|
729
771
|
const siteName = seo.site_name || void 0;
|
|
730
772
|
const pageUrl = base ? base + url : url;
|
|
731
|
-
const
|
|
732
|
-
const
|
|
773
|
+
const orgLogo = (_b = (_a = website == null ? void 0 : website.structured_data) == null ? void 0 : _a.org) == null ? void 0 : _b.logo;
|
|
774
|
+
const logo = typeof orgLogo === "string" && orgLogo || seo.default_og_image || void 0;
|
|
775
|
+
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;
|
|
776
|
+
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
777
|
const graphs = [];
|
|
734
778
|
const webPage = { "@context": "https://schema.org", "@type": "WebPage", "url": pageUrl };
|
|
735
779
|
if (title) webPage.name = title;
|
|
@@ -737,41 +781,50 @@ function buildJsonLd(options) {
|
|
|
737
781
|
if (siteName) webPage.isPartOf = { "@type": "WebSite", "name": siteName, "url": base || void 0 };
|
|
738
782
|
graphs.push(webPage);
|
|
739
783
|
if (url && url !== "/") graphs.push(breadcrumbList(url, base, siteName));
|
|
740
|
-
|
|
741
|
-
|
|
784
|
+
const declaredArticle = (override == null ? void 0 : override.ogType) === "article";
|
|
785
|
+
if (contextKey && context || declaredArticle) {
|
|
786
|
+
const row = context ?? {};
|
|
787
|
+
const type = declaredArticle ? "Article" : ((_c = config == null ? void 0 : config.typeMap) == null ? void 0 : _c[contextKey]) || typeFromContextKey(contextKey);
|
|
742
788
|
const entity = { "@context": "https://schema.org", "@type": type, "url": pageUrl };
|
|
743
|
-
const name = str(
|
|
744
|
-
const desc = str(
|
|
745
|
-
const image = str(
|
|
789
|
+
const name = (override == null ? void 0 : override.title) || str(row, "title", "name", "meta_title");
|
|
790
|
+
const desc = (override == null ? void 0 : override.description) || str(row, "meta_description", "excerpt", "description", "summary", "blurb");
|
|
791
|
+
const image = absImage((override == null ? void 0 : override.image) || str(row, "og_image", "cover_image_url", "image_url", "image"), base);
|
|
746
792
|
if (name) entity.name = name;
|
|
747
793
|
if (desc) entity.description = desc;
|
|
748
794
|
if (image) entity.image = image;
|
|
749
795
|
if (type === "Article") {
|
|
750
|
-
if (siteName)
|
|
751
|
-
|
|
796
|
+
if (siteName) {
|
|
797
|
+
entity.publisher = {
|
|
798
|
+
"@type": "Organization",
|
|
799
|
+
"name": siteName,
|
|
800
|
+
...logo ? { "logo": { "@type": "ImageObject", "url": logo } } : {}
|
|
801
|
+
};
|
|
802
|
+
}
|
|
803
|
+
const date = (override == null ? void 0 : override.publishedTime) || str(row, "published_at", "publishDate", "created_at", "date");
|
|
752
804
|
if (date) entity.datePublished = date;
|
|
753
|
-
const upd = str(
|
|
805
|
+
const upd = (override == null ? void 0 : override.modifiedTime) || str(row, "updated_at", "modified_at");
|
|
754
806
|
if (upd) entity.dateModified = upd;
|
|
755
|
-
const author = str(
|
|
807
|
+
const author = (override == null ? void 0 : override.author) || str(row, "author", "author_name");
|
|
756
808
|
if (author) entity.author = { "@type": "Person", "name": author };
|
|
757
809
|
if (name) {
|
|
758
810
|
entity.headline = name;
|
|
759
811
|
delete entity.name;
|
|
760
812
|
}
|
|
813
|
+
entity.mainEntityOfPage = { "@type": "WebPage", "@id": pageUrl };
|
|
761
814
|
} else if (type === "Product") {
|
|
762
|
-
const price = str(
|
|
763
|
-
const currency = str(
|
|
815
|
+
const price = str(row, "price", "amount");
|
|
816
|
+
const currency = str(row, "currency", "currency_code") || "USD";
|
|
764
817
|
if (price) {
|
|
765
818
|
entity.offers = { "@type": "Offer", "price": price, "priceCurrency": currency, "url": pageUrl };
|
|
766
819
|
}
|
|
767
|
-
const sku = str(
|
|
820
|
+
const sku = str(row, "sku", "id");
|
|
768
821
|
if (sku) entity.sku = sku;
|
|
769
822
|
} else if (type === "Event") {
|
|
770
|
-
const start = str(
|
|
771
|
-
const end = str(
|
|
823
|
+
const start = str(row, "start_at", "starts_at", "start_date", "date");
|
|
824
|
+
const end = str(row, "end_at", "ends_at", "end_date");
|
|
772
825
|
if (start) entity.startDate = start;
|
|
773
826
|
if (end) entity.endDate = end;
|
|
774
|
-
const loc = str(
|
|
827
|
+
const loc = str(row, "location", "venue", "address");
|
|
775
828
|
if (loc) entity.location = { "@type": "Place", "name": loc };
|
|
776
829
|
}
|
|
777
830
|
graphs.push(entity);
|
|
@@ -369,7 +369,28 @@ async function polyfillBloxSsgGlobals(options) {
|
|
|
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, pageUrl) {
|
|
374
|
+
if (!base) return value;
|
|
375
|
+
if (Array.isArray(value)) return value.map((entry) => absolutizeJsonLd(entry, base, pageUrl));
|
|
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)) {
|
|
380
|
+
if (entry.startsWith("#") && pageUrl) {
|
|
381
|
+
out[key] = pageUrl + entry;
|
|
382
|
+
continue;
|
|
383
|
+
}
|
|
384
|
+
if (entry.startsWith("/")) {
|
|
385
|
+
out[key] = base + entry;
|
|
386
|
+
continue;
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
out[key] = absolutizeJsonLd(entry, base, pageUrl);
|
|
390
|
+
}
|
|
391
|
+
return out;
|
|
392
|
+
}
|
|
393
|
+
function buildStructuredData(sd, locale, base, pageUrl) {
|
|
373
394
|
var _a;
|
|
374
395
|
if (!sd) return "";
|
|
375
396
|
const siteData = "org" in sd || "org_by_locale" in sd;
|
|
@@ -377,8 +398,8 @@ function buildStructuredData(sd, locale) {
|
|
|
377
398
|
const value = siteData ? perLocale ?? sd.org : sd;
|
|
378
399
|
if (value == null || typeof value === "string" && value === "") return "";
|
|
379
400
|
try {
|
|
380
|
-
const
|
|
381
|
-
return `<script type="application/ld+json">${
|
|
401
|
+
const resolved = typeof value === "string" ? value : JSON.stringify(absolutizeJsonLd(value, base ?? "", pageUrl));
|
|
402
|
+
return `<script type="application/ld+json">${resolved}${"<"}/script>`;
|
|
382
403
|
} catch {
|
|
383
404
|
return "";
|
|
384
405
|
}
|
|
@@ -450,10 +471,25 @@ function buildPageHead(options) {
|
|
|
450
471
|
if (seo.noindex || (page == null ? void 0 : page.noindex) || (override == null ? void 0 : override.noindex)) {
|
|
451
472
|
parts.push('<meta name="robots" content="noindex, nofollow">');
|
|
452
473
|
}
|
|
453
|
-
const structuredData = buildStructuredData(
|
|
474
|
+
const structuredData = buildStructuredData(
|
|
475
|
+
website == null ? void 0 : website.structured_data,
|
|
476
|
+
locale || (website == null ? void 0 : website.default_locale),
|
|
477
|
+
canonicalBase,
|
|
478
|
+
canonicalBase + url
|
|
479
|
+
);
|
|
454
480
|
if (structuredData) parts.push(structuredData);
|
|
455
|
-
const pageStructuredData = buildStructuredData(
|
|
481
|
+
const pageStructuredData = buildStructuredData(
|
|
482
|
+
page == null ? void 0 : page.structured_data,
|
|
483
|
+
locale || (website == null ? void 0 : website.default_locale),
|
|
484
|
+
canonicalBase,
|
|
485
|
+
canonicalBase + url
|
|
486
|
+
);
|
|
456
487
|
if (pageStructuredData) parts.push(pageStructuredData);
|
|
488
|
+
for (const graph of Array.isArray(override == null ? void 0 : override.structuredData) ? override.structuredData : (override == null ? void 0 : override.structuredData) ? [override.structuredData] : []) {
|
|
489
|
+
if (!graph || typeof graph !== "object") continue;
|
|
490
|
+
const resolved = absolutizeJsonLd(graph, canonicalBase, canonicalBase + url);
|
|
491
|
+
parts.push(`<script type="application/ld+json">${JSON.stringify(resolved)}${"<"}/script>`);
|
|
492
|
+
}
|
|
457
493
|
if (stateScript) {
|
|
458
494
|
parts.push(stateScript);
|
|
459
495
|
}
|
|
@@ -674,6 +710,12 @@ function typeFromContextKey(key) {
|
|
|
674
710
|
if (/(event|session|webinar)/.test(k)) return "Event";
|
|
675
711
|
return "WebPage";
|
|
676
712
|
}
|
|
713
|
+
function absImage(url, base) {
|
|
714
|
+
if (!url) return void 0;
|
|
715
|
+
if (/^https?:\/\//i.test(url)) return url;
|
|
716
|
+
if (!base) return url;
|
|
717
|
+
return base + (url.startsWith("/") ? url : `/${url}`);
|
|
718
|
+
}
|
|
677
719
|
function str(o, ...keys) {
|
|
678
720
|
for (const key of keys) {
|
|
679
721
|
const v = o[key];
|
|
@@ -699,14 +741,16 @@ function breadcrumbList(url, base, siteName) {
|
|
|
699
741
|
return { "@context": "https://schema.org", "@type": "BreadcrumbList", "itemListElement": items };
|
|
700
742
|
}
|
|
701
743
|
function buildJsonLd(options) {
|
|
702
|
-
var _a;
|
|
703
|
-
const { url, page, website, contextKey, context, config } = options;
|
|
744
|
+
var _a, _b, _c;
|
|
745
|
+
const { url, page, website, contextKey, context, config, override } = options;
|
|
704
746
|
const seo = (website == null ? void 0 : website.seo) ?? {};
|
|
705
747
|
const base = (seo.canonical_base_url || (website == null ? void 0 : website.domain) || "").replace(/\/$/, "");
|
|
706
748
|
const siteName = seo.site_name || void 0;
|
|
707
749
|
const pageUrl = base ? base + url : url;
|
|
708
|
-
const
|
|
709
|
-
const
|
|
750
|
+
const orgLogo = (_b = (_a = website == null ? void 0 : website.structured_data) == null ? void 0 : _a.org) == null ? void 0 : _b.logo;
|
|
751
|
+
const logo = typeof orgLogo === "string" && orgLogo || seo.default_og_image || void 0;
|
|
752
|
+
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;
|
|
753
|
+
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
754
|
const graphs = [];
|
|
711
755
|
const webPage = { "@context": "https://schema.org", "@type": "WebPage", "url": pageUrl };
|
|
712
756
|
if (title) webPage.name = title;
|
|
@@ -714,41 +758,50 @@ function buildJsonLd(options) {
|
|
|
714
758
|
if (siteName) webPage.isPartOf = { "@type": "WebSite", "name": siteName, "url": base || void 0 };
|
|
715
759
|
graphs.push(webPage);
|
|
716
760
|
if (url && url !== "/") graphs.push(breadcrumbList(url, base, siteName));
|
|
717
|
-
|
|
718
|
-
|
|
761
|
+
const declaredArticle = (override == null ? void 0 : override.ogType) === "article";
|
|
762
|
+
if (contextKey && context || declaredArticle) {
|
|
763
|
+
const row = context ?? {};
|
|
764
|
+
const type = declaredArticle ? "Article" : ((_c = config == null ? void 0 : config.typeMap) == null ? void 0 : _c[contextKey]) || typeFromContextKey(contextKey);
|
|
719
765
|
const entity = { "@context": "https://schema.org", "@type": type, "url": pageUrl };
|
|
720
|
-
const name = str(
|
|
721
|
-
const desc = str(
|
|
722
|
-
const image = str(
|
|
766
|
+
const name = (override == null ? void 0 : override.title) || str(row, "title", "name", "meta_title");
|
|
767
|
+
const desc = (override == null ? void 0 : override.description) || str(row, "meta_description", "excerpt", "description", "summary", "blurb");
|
|
768
|
+
const image = absImage((override == null ? void 0 : override.image) || str(row, "og_image", "cover_image_url", "image_url", "image"), base);
|
|
723
769
|
if (name) entity.name = name;
|
|
724
770
|
if (desc) entity.description = desc;
|
|
725
771
|
if (image) entity.image = image;
|
|
726
772
|
if (type === "Article") {
|
|
727
|
-
if (siteName)
|
|
728
|
-
|
|
773
|
+
if (siteName) {
|
|
774
|
+
entity.publisher = {
|
|
775
|
+
"@type": "Organization",
|
|
776
|
+
"name": siteName,
|
|
777
|
+
...logo ? { "logo": { "@type": "ImageObject", "url": logo } } : {}
|
|
778
|
+
};
|
|
779
|
+
}
|
|
780
|
+
const date = (override == null ? void 0 : override.publishedTime) || str(row, "published_at", "publishDate", "created_at", "date");
|
|
729
781
|
if (date) entity.datePublished = date;
|
|
730
|
-
const upd = str(
|
|
782
|
+
const upd = (override == null ? void 0 : override.modifiedTime) || str(row, "updated_at", "modified_at");
|
|
731
783
|
if (upd) entity.dateModified = upd;
|
|
732
|
-
const author = str(
|
|
784
|
+
const author = (override == null ? void 0 : override.author) || str(row, "author", "author_name");
|
|
733
785
|
if (author) entity.author = { "@type": "Person", "name": author };
|
|
734
786
|
if (name) {
|
|
735
787
|
entity.headline = name;
|
|
736
788
|
delete entity.name;
|
|
737
789
|
}
|
|
790
|
+
entity.mainEntityOfPage = { "@type": "WebPage", "@id": pageUrl };
|
|
738
791
|
} else if (type === "Product") {
|
|
739
|
-
const price = str(
|
|
740
|
-
const currency = str(
|
|
792
|
+
const price = str(row, "price", "amount");
|
|
793
|
+
const currency = str(row, "currency", "currency_code") || "USD";
|
|
741
794
|
if (price) {
|
|
742
795
|
entity.offers = { "@type": "Offer", "price": price, "priceCurrency": currency, "url": pageUrl };
|
|
743
796
|
}
|
|
744
|
-
const sku = str(
|
|
797
|
+
const sku = str(row, "sku", "id");
|
|
745
798
|
if (sku) entity.sku = sku;
|
|
746
799
|
} else if (type === "Event") {
|
|
747
|
-
const start = str(
|
|
748
|
-
const end = str(
|
|
800
|
+
const start = str(row, "start_at", "starts_at", "start_date", "date");
|
|
801
|
+
const end = str(row, "end_at", "ends_at", "end_date");
|
|
749
802
|
if (start) entity.startDate = start;
|
|
750
803
|
if (end) entity.endDate = end;
|
|
751
|
-
const loc = str(
|
|
804
|
+
const loc = str(row, "location", "venue", "address");
|
|
752
805
|
if (loc) entity.location = { "@type": "Place", "name": loc };
|
|
753
806
|
}
|
|
754
807
|
graphs.push(entity);
|
package/package.json
CHANGED