@sonordev/site-kit 8.2.0 → 8.4.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/AGENTS.md +13 -1
- package/CHANGELOG.md +12 -0
- package/README.md +9 -5
- package/agent-manifest.json +53 -8
- package/dist/{AnalyticsProvider-6TAA3XYB.js → AnalyticsProvider-D6GWEJSB.js} +6 -6
- package/dist/{ArticleFaqSection-3Q26DP7P.js → ArticleFaqSection-DEWE5B4Q.js} +1 -1
- package/dist/{ArticleViewTracker-H4N7YCLC.js → ArticleViewTracker-YZ76HM64.js} +17 -6
- package/dist/{BlocksPopup-FJT5YQD3.js → BlocksPopup-UJXZ4AXG.js} +6 -6
- package/dist/{ChatWidget-THQHHTAA.js → ChatWidget-H4EOSH5I.js} +6 -6
- package/dist/{FileField-OZXXJGUM.js → FileField-CKBYGCNT.js} +4 -4
- package/dist/{FormSpotlight-MLDJS246.js → FormSpotlight-CGF5ZE6S.js} +1 -1
- package/dist/{FormStage-6RVY7M3R.js → FormStage-PQPUPQWW.js} +1 -1
- package/dist/{ManagedForm-3VV54RVH.js → ManagedForm-YOEZ7CFS.js} +7 -7
- package/dist/{ManagedNewsletterForm-RTJDGMGG.js → ManagedNewsletterForm-EUWJ2HCA.js} +25 -11
- package/dist/{SignalCore-T7ZOCA44.js → SignalCore-JZSU7A44.js} +14 -8
- package/dist/SiteChat-OAZH34W7.js +6 -0
- package/dist/SiteDesignReporter-IWBMZJYU.js +12 -0
- package/dist/{SitePopups-K6ADAWFK.js → SitePopups-MLAT35UN.js} +6 -6
- package/dist/SitemapSync-6KQLKFO2.js +9 -0
- package/dist/_client/booking-widget.js +6 -6
- package/dist/_client/testimonial-section.js +3 -3
- package/dist/affiliates/index.js +4 -4
- package/dist/analytics/index.js +6 -6
- package/dist/analytics/publication-cta.d.ts +3 -0
- package/dist/{article-styles-GFXJJDLE.js → article-styles-AOOVVKXH.js} +7 -5
- package/dist/article-tables-6XHVULPU.js +2 -0
- package/dist/articles/Article.d.ts +2 -89
- package/dist/articles/ArticleFAQ.d.ts +2 -41
- package/dist/articles/ArticleFaqSection.d.ts +2 -2
- package/dist/articles/ArticleList.d.ts +2 -79
- package/dist/articles/ArticleViewTracker.d.ts +2 -15
- package/dist/articles/AuthorCard.d.ts +2 -10
- package/dist/articles/AuthorPage.d.ts +2 -8
- package/dist/articles/ClusterLandingPage.d.ts +2 -40
- package/dist/articles/ClusterNavigation.d.ts +2 -37
- package/dist/articles/ManagedNewsletterForm.d.ts +3 -12
- package/dist/articles/NewsletterShell.d.ts +2 -17
- package/dist/articles/NewsletterWidget.d.ts +2 -30
- package/dist/articles/PublicationLayout.d.ts +2 -67
- package/dist/articles/PublicationSidebar.d.ts +2 -36
- package/dist/articles/RelatedPosts.d.ts +2 -22
- package/dist/articles/ServiceCallout.d.ts +2 -56
- package/dist/articles/TableOfContents.d.ts +2 -6
- package/dist/articles/article-photos.d.ts +2 -9
- package/dist/articles/article-styles.d.ts +2 -21
- package/dist/articles/article-tables.d.ts +2 -12
- package/dist/articles/artwork.d.ts +2 -13
- package/dist/articles/author-schema.d.ts +2 -72
- package/dist/articles/author-social.d.ts +2 -14
- package/dist/articles/excerpt.d.ts +2 -17
- package/dist/articles/index.d.ts +2 -79
- package/dist/articles/index.js +16 -11
- package/dist/articles/news-sitemap.d.ts +2 -46
- package/dist/articles/processArticleHtml.d.ts +2 -34
- package/dist/articles/public-reads.d.ts +2 -26
- package/dist/articles/reading-time.d.ts +2 -9
- package/dist/articles/routes.d.ts +2 -52
- package/dist/articles/server-core.d.ts +2 -461
- package/dist/articles/server-ui.d.ts +2 -30
- package/dist/articles/server-ui.js +72 -62
- package/dist/articles/server.d.ts +2 -461
- package/dist/articles/server.js +14 -5
- package/dist/articles/types.d.ts +2 -316
- package/dist/articles/widget-styles.d.ts +2 -8
- package/dist/chat/index.js +8 -8
- package/dist/chunk-34ZYJTQR.js +1 -0
- package/dist/{chunk-727R7C5R.js → chunk-3VSFOD2Z.js} +2 -2
- package/dist/{chunk-JC2VS2SB.js → chunk-44GVU5UH.js} +1 -1
- package/dist/{chunk-WYZ4OUON.js → chunk-4HYIDQJJ.js} +1 -1
- package/dist/{chunk-WMVK77ND.js → chunk-4K735O3J.js} +1 -1
- package/dist/{chunk-L5UOHS6E.js → chunk-5D7ZISUP.js} +1 -1
- package/dist/{chunk-Q72M5KBS.js → chunk-5S7YTOCB.js} +1 -1
- package/dist/{chunk-WSNG2K3T.js → chunk-5TDZHIG6.js} +3 -3
- package/dist/{chunk-6CJGZFOU.js → chunk-A4MPHIVP.js} +1 -1
- package/dist/chunk-B7T2SFUF.js +1 -0
- package/dist/{chunk-FV2VD7WM.js → chunk-BC7JMY4Z.js} +3 -3
- package/dist/chunk-BLCHQIWR.js +319 -0
- package/dist/{chunk-NNEIBXGU.js → chunk-BLENFNBW.js} +2 -2
- package/dist/{chunk-NFRJTOTB.js → chunk-BSQP6PRA.js} +1 -1
- package/dist/{chunk-GKGSXUVQ.js → chunk-BVB5FBAA.js} +1 -1
- package/dist/{chunk-WACWV5EP.js → chunk-CE7VPAEH.js} +3 -3
- package/dist/{chunk-GYF2ULVO.js → chunk-DJAYFHVF.js} +1 -1
- package/dist/{chunk-WBC5B3JD.js → chunk-DKKYZLKR.js} +3 -3
- package/dist/{chunk-CAH4Y4PY.js → chunk-DLM4FFNH.js} +6 -2
- package/dist/{chunk-575L73NT.js → chunk-DS6LECIX.js} +1 -1
- package/dist/{chunk-Y3INC4QJ.js → chunk-E4PTMORJ.js} +1 -1
- package/dist/chunk-H72ZFO3F.js +1 -0
- package/dist/{chunk-WK3N3Y7V.js → chunk-HH2GOZTO.js} +2 -2
- package/dist/{chunk-JBEUZJS3.js → chunk-ITY4UZEJ.js} +3 -3
- package/dist/{chunk-GWP2VBFH.js → chunk-J4KX2D3Q.js} +3 -3
- package/dist/{chunk-57K4GW3D.js → chunk-JCSU6EJI.js} +1 -1
- package/dist/{chunk-SC4MZGWZ.js → chunk-JHTPHA2D.js} +6 -3
- package/dist/{chunk-YBAFUM3Z.js → chunk-JV5YWTJN.js} +13 -4
- package/dist/{chunk-I6QFPSUU.js → chunk-KASKB7UK.js} +11 -10
- package/dist/{chunk-SMYX3AAO.js → chunk-LEGMPX6N.js} +1 -1
- package/dist/{chunk-ZM2FNWIQ.js → chunk-LPVEBQVL.js} +1 -1
- package/dist/{chunk-HUBMKTPW.js → chunk-M5SF7NCC.js} +1 -1
- package/dist/{chunk-EBILJHUF.js → chunk-MTV5LYXN.js} +31 -2
- package/dist/{chunk-5ZCY36TY.js → chunk-MZX4EN6Z.js} +1 -1
- package/dist/{chunk-7FSB2EXS.js → chunk-OKITZFML.js} +1 -1
- package/dist/{chunk-H4R2GPAB.js → chunk-PEI6DRSK.js} +2 -2
- package/dist/{chunk-FVXFLVXF.js → chunk-QD73RO67.js} +3 -3
- package/dist/{chunk-66G47P5C.js → chunk-QKOVP7WO.js} +2 -2
- package/dist/{chunk-3EU6S5YC.js → chunk-RBNHRZGD.js} +1 -1
- package/dist/{chunk-XWIRU6UT.js → chunk-S6QDNXDK.js} +2 -2
- package/dist/{chunk-FQUGGPBM.js → chunk-TY6WNQO3.js} +124 -41
- package/dist/{chunk-QXMIKDOL.js → chunk-UVYUTBT4.js} +14 -4
- package/dist/{chunk-3G7YABRA.js → chunk-W7OPEMGJ.js} +4 -1
- package/dist/{chunk-JIH32RH2.js → chunk-XA7Q2VQA.js} +1 -1
- package/dist/{chunk-X7VKRHFF.js → chunk-XENW66OF.js} +1 -1
- package/dist/chunk-XI2XM7UG.js +14 -0
- package/dist/{chunk-BQZPHICL.js → chunk-YM5KMNTU.js} +1 -1
- package/dist/client/index.js +4 -16
- package/dist/fleet/index.js +6 -6
- package/dist/forms/index.js +9 -325
- package/dist/forms/server.js +2 -2
- package/dist/forms/types.d.ts +5 -0
- package/dist/forms/useForm.d.ts +4 -0
- package/dist/images/index.js +4 -4
- package/dist/index.js +1 -1
- package/dist/layout/client.js +9 -9
- package/dist/layout/index.js +10 -10
- package/dist/llms/index.js +8 -8
- package/dist/maps/index.js +4 -4
- package/dist/mcp/sonor.d.ts +46 -3
- package/dist/mcp/sonor.js +51 -29
- package/dist/mcp/transport.d.ts +1 -1
- package/dist/press-kit/articles/Article.d.ts +89 -0
- package/dist/press-kit/articles/ArticleFAQ.d.ts +41 -0
- package/dist/press-kit/articles/ArticleFaqSection.d.ts +2 -0
- package/dist/press-kit/articles/ArticleList.d.ts +79 -0
- package/dist/press-kit/articles/ArticleViewTracker.d.ts +15 -0
- package/dist/press-kit/articles/AuthorCard.d.ts +10 -0
- package/dist/press-kit/articles/AuthorPage.d.ts +8 -0
- package/dist/press-kit/articles/ClusterLandingPage.d.ts +40 -0
- package/dist/press-kit/articles/ClusterNavigation.d.ts +37 -0
- package/dist/press-kit/articles/ManagedNewsletterForm.d.ts +12 -0
- package/dist/press-kit/articles/NewsletterShell.d.ts +17 -0
- package/dist/press-kit/articles/NewsletterWidget.d.ts +30 -0
- package/dist/press-kit/articles/PublicationLayout.d.ts +67 -0
- package/dist/press-kit/articles/PublicationSidebar.d.ts +36 -0
- package/dist/press-kit/articles/RelatedPosts.d.ts +22 -0
- package/dist/press-kit/articles/ServiceCallout.d.ts +56 -0
- package/dist/press-kit/articles/TableOfContents.d.ts +6 -0
- package/dist/press-kit/articles/article-photos.d.ts +9 -0
- package/dist/press-kit/articles/article-styles.d.ts +21 -0
- package/dist/press-kit/articles/article-tables.d.ts +12 -0
- package/dist/press-kit/articles/artwork.d.ts +16 -0
- package/dist/press-kit/articles/author-schema.d.ts +72 -0
- package/dist/press-kit/articles/author-social.d.ts +14 -0
- package/dist/press-kit/articles/excerpt.d.ts +17 -0
- package/dist/press-kit/articles/index.d.ts +80 -0
- package/dist/press-kit/articles/news-sitemap.d.ts +40 -0
- package/dist/press-kit/articles/processArticleHtml.d.ts +34 -0
- package/dist/press-kit/articles/public-reads.d.ts +42 -0
- package/dist/press-kit/articles/publication-definition.d.ts +41 -0
- package/dist/press-kit/articles/publication-reads.d.ts +54 -0
- package/dist/press-kit/articles/reading-time.d.ts +9 -0
- package/dist/press-kit/articles/routes.d.ts +52 -0
- package/dist/press-kit/articles/server-core.d.ts +479 -0
- package/dist/press-kit/articles/server-ui.d.ts +31 -0
- package/dist/press-kit/articles/types.d.ts +339 -0
- package/dist/press-kit/articles/widget-styles.d.ts +8 -0
- package/dist/reputation/index.js +3 -3
- package/dist/reputation/server.js +2 -2
- package/dist/revalidate/index.js +2 -2
- package/dist/runtime/index.js +5 -4
- package/dist/seo/client.js +6 -6
- package/dist/seo/index.js +7 -7
- package/dist/seo/llms.js +8 -8
- package/dist/seo/register-sitemap-cli.js +1 -1
- package/dist/seo/sitemap.js +6 -6
- package/dist/server/index.js +3 -2
- package/dist/shared/build-entries.d.ts +2 -1
- package/dist/shared/clientApiConfig.d.ts +2 -0
- package/dist/shared/import-specifiers.d.ts +1 -1
- package/dist/shared/index.d.ts +6 -0
- package/dist/shared/index.js +8 -0
- package/dist/shared/reporting-gate.d.ts +2 -0
- package/dist/shared/version.d.ts +1 -1
- package/dist/signal/index.js +2 -2
- package/dist/sitemap/index.js +6 -6
- package/dist/sync/index.js +6 -6
- package/dist/website/images.js +4 -4
- package/dist/website/index.js +7 -7
- package/dist/website/popups.js +6 -6
- package/dist/{writeLLMsTxt-DGKLYXIW.js → writeLLMsTxt-N4Y4YC2H.js} +5 -5
- package/docs/MIGRATING-TO-PRESS-KIT.md +83 -0
- package/docs.json +145 -29
- package/package.json +15 -5
- package/src/articles/README.md +5 -360
- package/src/mcp/README.md +16 -0
- package/src/og/README.md +1 -1
- package/src/runtime/README.md +4 -0
- package/dist/SiteChat-JSHPGAE3.js +0 -6
- package/dist/SiteDesignReporter-L2JBAKKK.js +0 -12
- package/dist/SitemapSync-VV2YSMIW.js +0 -9
- package/dist/article-tables-AXSZOGNW.js +0 -2
|
@@ -1,23 +1,32 @@
|
|
|
1
|
-
import { readingTimeMinutes, ServiceCallouts, ClusterNavigation, getAuthorSocialLinks } from '../chunk-
|
|
2
|
-
export { ClusterNavigation } from '../chunk-
|
|
3
|
-
import { widgetStyle, widgetTitleStyle } from '../chunk-
|
|
4
|
-
import { resolvePublicationSiteUrl, addExternalLinkTargets } from '../chunk-
|
|
5
|
-
import { fetchArticleBySlug, fetchRelatedArticles, fetchArticleCategories, getTopicCluster } from '../chunk-
|
|
6
|
-
import { insertArticlePhotos } from '../chunk-
|
|
7
|
-
export { articlePhotoCss, insertArticlePhotos } from '../chunk-
|
|
8
|
-
export { articleTableCss, wrapArticleTables } from '../chunk-
|
|
9
|
-
import { resolveArticleArtwork, articleArtworkImageStyle } from '../chunk-
|
|
10
|
-
export { resolveArticleArtwork } from '../chunk-
|
|
11
|
-
import
|
|
12
|
-
|
|
1
|
+
import { readingTimeMinutes, ServiceCallouts, ClusterNavigation, getAuthorSocialLinks } from '../chunk-BC7JMY4Z.js';
|
|
2
|
+
export { ClusterNavigation } from '../chunk-BC7JMY4Z.js';
|
|
3
|
+
import { widgetStyle, widgetTitleStyle } from '../chunk-DJAYFHVF.js';
|
|
4
|
+
import { resolvePublicationSiteUrl, addExternalLinkTargets } from '../chunk-5D7ZISUP.js';
|
|
5
|
+
import { fetchArticleBySlug, fetchRelatedArticles, fetchArticleCategories, getTopicCluster, ArticleUnavailableError } from '../chunk-TY6WNQO3.js';
|
|
6
|
+
import { insertArticlePhotos } from '../chunk-M5SF7NCC.js';
|
|
7
|
+
export { articlePhotoCss, insertArticlePhotos } from '../chunk-M5SF7NCC.js';
|
|
8
|
+
export { articleTableCss, wrapArticleTables } from '../chunk-E4PTMORJ.js';
|
|
9
|
+
import { resolveArticleArtwork, articleArtworkImageStyle } from '../chunk-UVYUTBT4.js';
|
|
10
|
+
export { resolveArticleArtwork } from '../chunk-UVYUTBT4.js';
|
|
11
|
+
import '../chunk-H72ZFO3F.js';
|
|
12
|
+
import { createPublicationRoutes, articleCategorySlug } from '../chunk-4K735O3J.js';
|
|
13
|
+
export { articleCategorySlug, createPublicationRoutes, resolveArticleUrl, resolvePublicationUrl } from '../chunk-4K735O3J.js';
|
|
14
|
+
import '../chunk-34ZYJTQR.js';
|
|
15
|
+
import '../chunk-LPVEBQVL.js';
|
|
16
|
+
import '../chunk-UAYAJPEP.js';
|
|
13
17
|
import '../chunk-VWWITFWM.js';
|
|
18
|
+
import '../chunk-4KZ6W3ZH.js';
|
|
14
19
|
import { withSiteParam } from '../chunk-MJP63SSS.js';
|
|
20
|
+
import '../chunk-6KU7STM3.js';
|
|
15
21
|
import '../chunk-C7TLGL3R.js';
|
|
16
22
|
import '../chunk-MH2DSGC6.js';
|
|
17
23
|
import '../chunk-YVKRYQRG.js';
|
|
18
24
|
import '../chunk-FESKKJAS.js';
|
|
19
25
|
import '../chunk-A4CC4ZG3.js';
|
|
26
|
+
import '../chunk-W7OPEMGJ.js';
|
|
27
|
+
import '../chunk-5S7YTOCB.js';
|
|
20
28
|
import '../chunk-PKBMQBKP.js';
|
|
29
|
+
import 'server-only';
|
|
21
30
|
import { marked } from 'marked';
|
|
22
31
|
import { notFound } from 'next/navigation';
|
|
23
32
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
@@ -109,8 +118,8 @@ async function Article({
|
|
|
109
118
|
}
|
|
110
119
|
const [post, { articleCss }, { wrapArticleTables: wrapArticleTables2 }] = await Promise.all([
|
|
111
120
|
fetchArticleBySlug({ apiUrl, apiKey, site }, slug),
|
|
112
|
-
unstyled ? Promise.resolve({ articleCss: "" }) : import('../article-styles-
|
|
113
|
-
import('../article-tables-
|
|
121
|
+
unstyled ? Promise.resolve({ articleCss: "" }) : import('../article-styles-AOOVVKXH.js'),
|
|
122
|
+
import('../article-tables-6XHVULPU.js')
|
|
114
123
|
]);
|
|
115
124
|
if (!post) {
|
|
116
125
|
if (notFound$1) notFound();
|
|
@@ -135,14 +144,14 @@ async function Article({
|
|
|
135
144
|
...item,
|
|
136
145
|
answer: addExternalLinkTargets(item.answer || "", siteUrlResolved)
|
|
137
146
|
})) ?? faqRaw;
|
|
138
|
-
const { ArticleViewTracker } = await import('../ArticleViewTracker-
|
|
147
|
+
const { ArticleViewTracker } = await import('../ArticleViewTracker-YZ76HM64.js');
|
|
139
148
|
if (children) {
|
|
140
149
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
141
150
|
/* @__PURE__ */ jsx(ArticleViewTracker, { slug: post.slug, site }),
|
|
142
151
|
children({ post, tableOfContents, relatedPosts })
|
|
143
152
|
] });
|
|
144
153
|
}
|
|
145
|
-
const { ArticleFaqSection } = await import('../ArticleFaqSection-
|
|
154
|
+
const { ArticleFaqSection } = await import('../ArticleFaqSection-DEWE5B4Q.js');
|
|
146
155
|
const date = post.published_at ? new Date(post.published_at).toLocaleDateString("en-US", { month: "long", day: "numeric", year: "numeric" }) : null;
|
|
147
156
|
const hasToc = showToc && tableOfContents.length > 0;
|
|
148
157
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -210,6 +219,14 @@ async function Article({
|
|
|
210
219
|
)) })
|
|
211
220
|
] })
|
|
212
221
|
] }),
|
|
222
|
+
post.editorial_verification?.note && /* @__PURE__ */ jsxs("aside", { className: "sk-article-verification", "aria-label": "Editorial verification", children: [
|
|
223
|
+
/* @__PURE__ */ jsx("h2", { children: "Editorial verification" }),
|
|
224
|
+
/* @__PURE__ */ jsx("p", { children: post.editorial_verification.note }),
|
|
225
|
+
post.editorial_verification.reviewedAt && /* @__PURE__ */ jsxs("p", { children: [
|
|
226
|
+
"Reviewed ",
|
|
227
|
+
/* @__PURE__ */ jsx("time", { dateTime: post.editorial_verification.reviewedAt, children: new Date(post.editorial_verification.reviewedAt).toLocaleDateString("en-US", { timeZone: "UTC" }) })
|
|
228
|
+
] })
|
|
229
|
+
] }),
|
|
213
230
|
post.tags && post.tags.length > 0 && /* @__PURE__ */ jsx("div", { className: cls(unstyled, styles, "tags", "sk-article-tags"), children: post.tags.map((tag, index) => {
|
|
214
231
|
const tagName = typeof tag === "string" ? tag : tag?.name || "";
|
|
215
232
|
return /* @__PURE__ */ jsxs("a", { href: `${routes.index}?tag=${encodeURIComponent(tagName)}`, className: cls(unstyled, styles, "tag", "sk-article-tag"), children: [
|
|
@@ -217,6 +234,10 @@ async function Article({
|
|
|
217
234
|
tagName
|
|
218
235
|
] }, `${tagName}-${index}`);
|
|
219
236
|
}) }),
|
|
237
|
+
post.publication_cta?.label && post.publication_cta.goal && /^(?:https?:\/\/|\/(?!\/))/.test(post.publication_cta.url) && /* @__PURE__ */ jsx("aside", { className: "sk-article-publication-cta", "aria-label": "Next step", children: /* @__PURE__ */ jsxs("a", { href: post.publication_cta.url, "data-sk-article-id": post.id, "data-sk-article-goal": post.publication_cta.goal, style: { display: "inline-flex", alignItems: "center", minHeight: 44, padding: "12px 20px", color: "var(--sk-primary)", border: "1px solid currentColor", borderRadius: 8 }, children: [
|
|
238
|
+
post.publication_cta.label,
|
|
239
|
+
" \u2192"
|
|
240
|
+
] }) }),
|
|
220
241
|
/* @__PURE__ */ jsx(
|
|
221
242
|
ServiceCallouts,
|
|
222
243
|
{
|
|
@@ -349,12 +370,12 @@ async function fetchArticleList(params) {
|
|
|
349
370
|
next: { revalidate: 60 }
|
|
350
371
|
});
|
|
351
372
|
if (!response.ok) {
|
|
352
|
-
|
|
353
|
-
return emptyResult();
|
|
373
|
+
throw new ArticleUnavailableError(response.status);
|
|
354
374
|
}
|
|
355
375
|
const data = await response.json();
|
|
376
|
+
if (!Array.isArray(data.posts)) throw new ArticleUnavailableError();
|
|
356
377
|
return {
|
|
357
|
-
posts: data.posts
|
|
378
|
+
posts: data.posts,
|
|
358
379
|
pagination: {
|
|
359
380
|
page: data.pagination?.page || 1,
|
|
360
381
|
perPage: data.pagination?.per_page || 12,
|
|
@@ -365,13 +386,9 @@ async function fetchArticleList(params) {
|
|
|
365
386
|
}
|
|
366
387
|
};
|
|
367
388
|
} catch (error) {
|
|
368
|
-
|
|
369
|
-
return emptyResult();
|
|
389
|
+
throw error instanceof ArticleUnavailableError ? error : new ArticleUnavailableError();
|
|
370
390
|
}
|
|
371
391
|
}
|
|
372
|
-
function emptyResult() {
|
|
373
|
-
return { posts: [], pagination: { page: 1, perPage: 12, total: 0, totalPages: 0, hasNext: false, hasPrev: false } };
|
|
374
|
-
}
|
|
375
392
|
function cls2(unstyled, styles, key, defaultClass, extra) {
|
|
376
393
|
if (unstyled) return styles[key] || void 0;
|
|
377
394
|
const base = styles[key] || defaultClass;
|
|
@@ -409,7 +426,7 @@ async function ArticleList({
|
|
|
409
426
|
const [articleData, categories, { articleListCss }] = await Promise.all([
|
|
410
427
|
fetchArticleList({ apiUrl, apiKey, category, tag, author, featured, search, cluster, page, perPage, orderBy, order, site }),
|
|
411
428
|
showCategoryFilter ? fetchArticleCategories({ apiUrl, apiKey, site }) : Promise.resolve([]),
|
|
412
|
-
unstyled || children ? Promise.resolve({ articleListCss: "" }) : import('../article-styles-
|
|
429
|
+
unstyled || children ? Promise.resolve({ articleListCss: "" }) : import('../article-styles-AOOVVKXH.js')
|
|
413
430
|
]);
|
|
414
431
|
if (children) {
|
|
415
432
|
return children({ posts: articleData.posts, pagination: articleData.pagination, categories });
|
|
@@ -943,6 +960,9 @@ async function PublicationLayout({
|
|
|
943
960
|
}) {
|
|
944
961
|
const hasSidebar = showSidebar && layout !== "full-width";
|
|
945
962
|
return /* @__PURE__ */ jsxs("div", { className, children: [
|
|
963
|
+
/* @__PURE__ */ jsx("style", { children: `.sk-publication-columns { display:grid; gap:48px; grid-template-columns:minmax(0,1fr) 300px; }
|
|
964
|
+
.sk-publication-columns--left { grid-template-columns:300px minmax(0,1fr); }
|
|
965
|
+
@media(max-width:800px) { .sk-publication-columns, .sk-publication-columns--left { grid-template-columns:minmax(0,1fr); gap:32px; } .sk-publication-columns--left > main { grid-row:1; } }` }),
|
|
946
966
|
hero && /* @__PURE__ */ jsx(
|
|
947
967
|
"section",
|
|
948
968
|
{
|
|
@@ -990,43 +1010,33 @@ async function PublicationLayout({
|
|
|
990
1010
|
margin: "0 auto",
|
|
991
1011
|
padding: "40px 20px"
|
|
992
1012
|
},
|
|
993
|
-
children: /* @__PURE__ */ jsxs(
|
|
994
|
-
"
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
site,
|
|
1021
|
-
basePath,
|
|
1022
|
-
routing,
|
|
1023
|
-
currentCategory,
|
|
1024
|
-
...sidebarProps
|
|
1025
|
-
}
|
|
1026
|
-
)
|
|
1027
|
-
]
|
|
1028
|
-
}
|
|
1029
|
-
)
|
|
1013
|
+
children: /* @__PURE__ */ jsxs("div", { className: hasSidebar ? `sk-publication-columns${layout === "sidebar-left" ? " sk-publication-columns--left" : ""}` : void 0, children: [
|
|
1014
|
+
hasSidebar && layout === "sidebar-left" && /* @__PURE__ */ jsx(
|
|
1015
|
+
PublicationSidebar,
|
|
1016
|
+
{
|
|
1017
|
+
apiUrl,
|
|
1018
|
+
apiKey,
|
|
1019
|
+
site,
|
|
1020
|
+
basePath,
|
|
1021
|
+
routing,
|
|
1022
|
+
currentCategory,
|
|
1023
|
+
...sidebarProps
|
|
1024
|
+
}
|
|
1025
|
+
),
|
|
1026
|
+
/* @__PURE__ */ jsx("main", { style: { minWidth: 0 }, children }),
|
|
1027
|
+
hasSidebar && layout === "sidebar-right" && /* @__PURE__ */ jsx(
|
|
1028
|
+
PublicationSidebar,
|
|
1029
|
+
{
|
|
1030
|
+
apiUrl,
|
|
1031
|
+
apiKey,
|
|
1032
|
+
site,
|
|
1033
|
+
basePath,
|
|
1034
|
+
routing,
|
|
1035
|
+
currentCategory,
|
|
1036
|
+
...sidebarProps
|
|
1037
|
+
}
|
|
1038
|
+
)
|
|
1039
|
+
] })
|
|
1030
1040
|
}
|
|
1031
1041
|
)
|
|
1032
1042
|
] });
|
|
@@ -1,461 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* Data and metadata helpers only (no React components). For `Article` / `ArticleList`
|
|
5
|
-
* in the App Router, import from `@sonordev/site-kit/articles/server-ui` so Next never
|
|
6
|
-
* treats `getAllArticleSlugs` / `generateArticleStaticParams` as client code.
|
|
7
|
-
*/
|
|
8
|
-
import type { Metadata } from 'next';
|
|
9
|
-
import type { Article as ArticleRecord, ArticleAuthor, TopicCluster, ClusterNavigation } from './types';
|
|
10
|
-
import { sanitizeExcerpt } from './excerpt';
|
|
11
|
-
import { type PublicationRoutingOptions } from './routes';
|
|
12
|
-
import { type NewsSitemapOptions } from './news-sitemap';
|
|
13
|
-
export { sanitizeExcerpt };
|
|
14
|
-
export declare const SEO_LIMITS: {
|
|
15
|
-
readonly title: {
|
|
16
|
-
readonly min: 30;
|
|
17
|
-
readonly max: 60;
|
|
18
|
-
readonly recommended: 55;
|
|
19
|
-
};
|
|
20
|
-
readonly metaDescription: {
|
|
21
|
-
readonly min: 120;
|
|
22
|
-
readonly max: 160;
|
|
23
|
-
readonly recommended: 155;
|
|
24
|
-
};
|
|
25
|
-
readonly excerpt: {
|
|
26
|
-
readonly min: 100;
|
|
27
|
-
readonly max: 300;
|
|
28
|
-
readonly recommended: 200;
|
|
29
|
-
};
|
|
30
|
-
readonly slug: {
|
|
31
|
-
readonly max: 75;
|
|
32
|
-
};
|
|
33
|
-
readonly focusKeyphrase: {
|
|
34
|
-
readonly min: 2;
|
|
35
|
-
readonly max: 4;
|
|
36
|
-
readonly words: true;
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
export interface SeoValidationResult {
|
|
40
|
-
field: string;
|
|
41
|
-
value: string;
|
|
42
|
-
length: number;
|
|
43
|
-
limit: {
|
|
44
|
-
min?: number;
|
|
45
|
-
max: number;
|
|
46
|
-
recommended?: number;
|
|
47
|
-
};
|
|
48
|
-
status: 'good' | 'warning' | 'error';
|
|
49
|
-
message: string;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Validate SEO title (60 chars max, keyword-first recommended)
|
|
53
|
-
*/
|
|
54
|
-
export declare function validateSeoTitle(title: string, focusKeyphrase?: string): SeoValidationResult;
|
|
55
|
-
/**
|
|
56
|
-
* Validate meta description (150-160 chars, benefit-driven)
|
|
57
|
-
*/
|
|
58
|
-
export declare function validateMetaDescription(description: string, focusKeyphrase?: string): SeoValidationResult;
|
|
59
|
-
/**
|
|
60
|
-
* Full SEO validation for an article
|
|
61
|
-
*/
|
|
62
|
-
export declare function validateArticleSeo(post: Partial<ArticleRecord>): SeoValidationResult[];
|
|
63
|
-
/**
|
|
64
|
-
* Fetch an article by slug (server-side)
|
|
65
|
-
*
|
|
66
|
-
* @param options.site - Sub-site host override. Omit to resolve from
|
|
67
|
-
* NEXT_PUBLIC_SITE_URL.
|
|
68
|
-
*/
|
|
69
|
-
export declare function getArticle(slug: string, options?: {
|
|
70
|
-
site?: string;
|
|
71
|
-
}): Promise<ArticleRecord | null>;
|
|
72
|
-
/**
|
|
73
|
-
* Fetch an article by slug, or answer 404 when there isn't one.
|
|
74
|
-
*
|
|
75
|
-
* `getArticle` returns null for a mistyped or deleted slug, and the page
|
|
76
|
-
* used to carry on rendering a "not found" message with HTTP 200 and an
|
|
77
|
-
* indexable title: a soft 404 on every bad post URL. This calls Next's
|
|
78
|
-
* `notFound()` instead, so the
|
|
79
|
-
* route answers 404 with `noindex`.
|
|
80
|
-
*
|
|
81
|
-
* Call it from `generateMetadata` (or the page) before rendering `Article`:
|
|
82
|
-
* metadata resolves before anything streams, so the status is a real 404.
|
|
83
|
-
* The fetch is the same one `Article` and `generateArticleMetadata` make,
|
|
84
|
-
* and Next dedupes it within the render.
|
|
85
|
-
*
|
|
86
|
-
* @example
|
|
87
|
-
* ```tsx
|
|
88
|
-
* export async function generateMetadata({ params }) {
|
|
89
|
-
* const { slug } = await params
|
|
90
|
-
* await requireArticle(slug)
|
|
91
|
-
* return generateArticleMetadata(slug, { siteName: 'Acme' })
|
|
92
|
-
* }
|
|
93
|
-
* ```
|
|
94
|
-
*/
|
|
95
|
-
export declare function requireArticle(slug: string, options?: {
|
|
96
|
-
site?: string;
|
|
97
|
-
}): Promise<ArticleRecord>;
|
|
98
|
-
/**
|
|
99
|
-
* Fetch all article slugs for static generation
|
|
100
|
-
*/
|
|
101
|
-
export declare function getAllArticleSlugs(): Promise<{
|
|
102
|
-
slug: string;
|
|
103
|
-
id?: string;
|
|
104
|
-
last_modified?: string;
|
|
105
|
-
article_type?: string;
|
|
106
|
-
}[]>;
|
|
107
|
-
/**
|
|
108
|
-
* Fetch article categories
|
|
109
|
-
*/
|
|
110
|
-
export declare function getArticleCategories(options?: {
|
|
111
|
-
site?: string;
|
|
112
|
-
}): Promise<{
|
|
113
|
-
name: string;
|
|
114
|
-
slug: string;
|
|
115
|
-
post_count: number;
|
|
116
|
-
}[]>;
|
|
117
|
-
export interface PublicationMetadataOptions extends PublicationRoutingOptions {
|
|
118
|
-
/** Site name for og:site_name */
|
|
119
|
-
siteName?: string;
|
|
120
|
-
/** Base URL of the site */
|
|
121
|
-
siteUrl?: string;
|
|
122
|
-
/** URL path prefix for publication index and posts (default `/article`, e.g. `/insights`) */
|
|
123
|
-
/** Default OG image */
|
|
124
|
-
defaultImage?: string;
|
|
125
|
-
/** Twitter handle */
|
|
126
|
-
twitterHandle?: string;
|
|
127
|
-
}
|
|
128
|
-
export interface ArticleMetadataOptions extends PublicationMetadataOptions {
|
|
129
|
-
/**
|
|
130
|
-
* Declare the featured image (or `defaultImage`) as `openGraph.images` and
|
|
131
|
-
* `twitter.images`. Default true.
|
|
132
|
-
*
|
|
133
|
-
* Pass false when the post route has its own card, an
|
|
134
|
-
* `opengraph-image.tsx` beside the page. Next lets declared images beat
|
|
135
|
-
* that file, so leaving them in silently swaps the post's card for the raw
|
|
136
|
-
* photo. With false the `images` keys are left out entirely, not set to
|
|
137
|
-
* undefined: Next checks `hasOwnProperty('images')`, so even an undefined
|
|
138
|
-
* value hides the card.
|
|
139
|
-
*/
|
|
140
|
-
images?: boolean;
|
|
141
|
-
/**
|
|
142
|
-
* What to do when the post doesn't exist. Default true: call Next's
|
|
143
|
-
* `notFound()`, so the route answers 404. False returns placeholder
|
|
144
|
-
* metadata marked `noindex` instead, for a page that renders its own
|
|
145
|
-
* missing-post state.
|
|
146
|
-
*/
|
|
147
|
-
notFound?: boolean;
|
|
148
|
-
}
|
|
149
|
-
/**
|
|
150
|
-
* Generate metadata for an article page
|
|
151
|
-
*/
|
|
152
|
-
export declare function generateArticleMetadata(slug: string, options?: ArticleMetadataOptions): Promise<Metadata>;
|
|
153
|
-
/**
|
|
154
|
-
* Generate metadata for the publication index page
|
|
155
|
-
*/
|
|
156
|
-
export declare function generatePublicationMetadata(options: PublicationMetadataOptions & {
|
|
157
|
-
title?: string;
|
|
158
|
-
description?: string;
|
|
159
|
-
}): Metadata;
|
|
160
|
-
/**
|
|
161
|
-
* Generate metadata for a category page
|
|
162
|
-
*/
|
|
163
|
-
export declare function generateArticleCategoryMetadata(categoryName: string, options?: PublicationMetadataOptions & {
|
|
164
|
-
categorySlug?: string;
|
|
165
|
-
}): Metadata;
|
|
166
|
-
/**
|
|
167
|
-
* What Next passes to a route's `generateStaticParams`: the parent segments'
|
|
168
|
-
* params. The publication helpers ignore it; it's typed so they can be exported
|
|
169
|
-
* directly as `generateStaticParams`.
|
|
170
|
-
*/
|
|
171
|
-
export interface NextStaticParamsProps {
|
|
172
|
-
params: unknown;
|
|
173
|
-
}
|
|
174
|
-
/**
|
|
175
|
-
* Generate static params for article pages.
|
|
176
|
-
*
|
|
177
|
-
* Export it directly for the default `/article/[slug]` routes:
|
|
178
|
-
*
|
|
179
|
-
* export const generateStaticParams = generateArticleStaticParams
|
|
180
|
-
*
|
|
181
|
-
* With routing options, wrap it:
|
|
182
|
-
*
|
|
183
|
-
* export function generateStaticParams() {
|
|
184
|
-
* return generateArticleStaticParams(routing)
|
|
185
|
-
* }
|
|
186
|
-
*/
|
|
187
|
-
export declare function generateArticleStaticParams(options?: PublicationRoutingOptions): Promise<{
|
|
188
|
-
slug: string;
|
|
189
|
-
category?: string;
|
|
190
|
-
}[]>;
|
|
191
|
-
export declare function generateArticleStaticParams(props: NextStaticParamsProps): Promise<{
|
|
192
|
-
slug: string;
|
|
193
|
-
category?: string;
|
|
194
|
-
}[]>;
|
|
195
|
-
/**
|
|
196
|
-
* Generate static params for category pages. Takes no arguments, so it can be
|
|
197
|
-
* exported directly:
|
|
198
|
-
*
|
|
199
|
-
* export const generateStaticParams = generateCategoryStaticParams
|
|
200
|
-
*/
|
|
201
|
-
export declare function generateCategoryStaticParams(): Promise<{
|
|
202
|
-
category: string;
|
|
203
|
-
}[]>;
|
|
204
|
-
interface SitemapEntry {
|
|
205
|
-
url: string;
|
|
206
|
-
lastModified?: Date;
|
|
207
|
-
changeFrequency?: 'always' | 'hourly' | 'daily' | 'weekly' | 'monthly' | 'yearly' | 'never';
|
|
208
|
-
priority?: number;
|
|
209
|
-
/** Image sitemap entries; Next's MetadataRoute.Sitemap renders them as <image:image>. */
|
|
210
|
-
images?: string[];
|
|
211
|
-
}
|
|
212
|
-
/**
|
|
213
|
-
* Generate sitemap entries for articles
|
|
214
|
-
*/
|
|
215
|
-
export interface ArticleSitemapOptions extends PublicationRoutingOptions {
|
|
216
|
-
includeCategories?: boolean;
|
|
217
|
-
includeClusters?: boolean;
|
|
218
|
-
}
|
|
219
|
-
export declare function generateArticleSitemap(siteUrl: string, options?: ArticleSitemapOptions): Promise<SitemapEntry[]>;
|
|
220
|
-
/**
|
|
221
|
-
* Google News sitemap XML for posts published in the last two days. Serve it
|
|
222
|
-
* from a route (app/news-sitemap.xml/route.ts) and list it in robots.txt.
|
|
223
|
-
*/
|
|
224
|
-
export declare function generateNewsSitemap(options: NewsSitemapOptions & {
|
|
225
|
-
site?: string;
|
|
226
|
-
}): Promise<string>;
|
|
227
|
-
/**
|
|
228
|
-
* Generate JSON-LD schema for an article
|
|
229
|
-
*/
|
|
230
|
-
export declare function generateArticleSchema(post: ArticleRecord, options?: PublicationRoutingOptions & {
|
|
231
|
-
siteUrl?: string;
|
|
232
|
-
siteName?: string;
|
|
233
|
-
logoUrl?: string;
|
|
234
|
-
}): object;
|
|
235
|
-
/**
|
|
236
|
-
* Generate JSON-LD schema for publication index/listing page
|
|
237
|
-
*/
|
|
238
|
-
export declare function generateArticleListSchema(options?: PublicationRoutingOptions & {
|
|
239
|
-
siteUrl?: string;
|
|
240
|
-
siteName?: string;
|
|
241
|
-
description?: string;
|
|
242
|
-
}): object;
|
|
243
|
-
/**
|
|
244
|
-
* Generate standalone FAQ schema (great for PAA inclusion)
|
|
245
|
-
*/
|
|
246
|
-
export declare function generateFaqSchema(faqItems: {
|
|
247
|
-
question: string;
|
|
248
|
-
answer: string;
|
|
249
|
-
}[]): object | null;
|
|
250
|
-
export interface HowToStep {
|
|
251
|
-
name: string;
|
|
252
|
-
text: string;
|
|
253
|
-
image?: string;
|
|
254
|
-
url?: string;
|
|
255
|
-
}
|
|
256
|
-
/**
|
|
257
|
-
* Generate HowTo schema for step-by-step posts
|
|
258
|
-
*/
|
|
259
|
-
export declare function generateHowToSchema(post: ArticleRecord, steps: HowToStep[], options?: PublicationRoutingOptions & {
|
|
260
|
-
siteUrl?: string;
|
|
261
|
-
}): object;
|
|
262
|
-
export interface RssFeedOptions extends PublicationRoutingOptions {
|
|
263
|
-
siteUrl: string;
|
|
264
|
-
siteName: string;
|
|
265
|
-
description?: string;
|
|
266
|
-
language?: string;
|
|
267
|
-
copyright?: string;
|
|
268
|
-
managingEditor?: string;
|
|
269
|
-
webMaster?: string;
|
|
270
|
-
ttl?: number;
|
|
271
|
-
imageUrl?: string;
|
|
272
|
-
/** Most recent posts to include. Defaults to FEED_DEFAULT_ITEMS (20); older posts stay in the sitemap. */
|
|
273
|
-
maxItems?: number;
|
|
274
|
-
}
|
|
275
|
-
/**
|
|
276
|
-
* Fetch all published articles for RSS feed.
|
|
277
|
-
*
|
|
278
|
-
* Paginates with `per_page`/`page` — the only pagination params the deployed
|
|
279
|
-
* controller reads — accumulating up to FEED_MAX_POSTS. A mid-loop failure
|
|
280
|
-
* returns what was accumulated so far: a partial feed beats an empty one.
|
|
281
|
-
*/
|
|
282
|
-
export declare function getAllArticles(options?: {
|
|
283
|
-
maxPosts?: number; /** Sub-site host override (see getArticle). */
|
|
284
|
-
site?: string;
|
|
285
|
-
}): Promise<ArticleRecord[]>;
|
|
286
|
-
/**
|
|
287
|
-
* Generate RSS 2.0 feed XML
|
|
288
|
-
*/
|
|
289
|
-
export declare function generateRssFeed(options: RssFeedOptions): Promise<string>;
|
|
290
|
-
/**
|
|
291
|
-
* Generate Atom feed XML
|
|
292
|
-
*/
|
|
293
|
-
export declare function generateAtomFeed(options: RssFeedOptions): Promise<string>;
|
|
294
|
-
/**
|
|
295
|
-
* Fetch all active topic clusters for the project.
|
|
296
|
-
* Uses the real cluster data from Sonor API (not heuristic-based).
|
|
297
|
-
*/
|
|
298
|
-
export declare function getTopicClusters(options?: {
|
|
299
|
-
site?: string;
|
|
300
|
-
}): Promise<TopicCluster[]>;
|
|
301
|
-
/**
|
|
302
|
-
* Fetch a single topic cluster with its pillar and support articles.
|
|
303
|
-
*/
|
|
304
|
-
export declare function getTopicCluster(slug: string, options?: {
|
|
305
|
-
site?: string;
|
|
306
|
-
}): Promise<TopicCluster | null>;
|
|
307
|
-
/**
|
|
308
|
-
* Get cluster navigation context for an article.
|
|
309
|
-
* Returns the cluster name, pillar link, and sibling articles.
|
|
310
|
-
*/
|
|
311
|
-
export declare function getClusterNavigation(post: ArticleRecord): ClusterNavigation | null;
|
|
312
|
-
/**
|
|
313
|
-
* Fetch posts by category for topic cluster organization
|
|
314
|
-
*/
|
|
315
|
-
export declare function getPostsByCategory(categorySlug: string, options?: {
|
|
316
|
-
site?: string;
|
|
317
|
-
}): Promise<ArticleRecord[]>;
|
|
318
|
-
/**
|
|
319
|
-
* Generate ItemList schema for a cluster's pillar page.
|
|
320
|
-
* Wraps supporting posts as a structured list Google can parse.
|
|
321
|
-
*/
|
|
322
|
-
export declare function generateClusterItemListSchema(cluster: TopicCluster, options?: PublicationRoutingOptions & {
|
|
323
|
-
siteUrl?: string;
|
|
324
|
-
}): object;
|
|
325
|
-
/**
|
|
326
|
-
* Generate Article schema with cluster relationship (isPartOf / hasPart).
|
|
327
|
-
* - Support articles get `isPartOf` pointing to the pillar.
|
|
328
|
-
* - Pillar articles get `hasPart` listing all supports.
|
|
329
|
-
*/
|
|
330
|
-
export declare function generateClusterArticleSchema(post: ArticleRecord, cluster: TopicCluster, options?: PublicationRoutingOptions & {
|
|
331
|
-
siteUrl?: string;
|
|
332
|
-
siteName?: string;
|
|
333
|
-
logoUrl?: string;
|
|
334
|
-
}): object;
|
|
335
|
-
/**
|
|
336
|
-
* Generate BreadcrumbList schema for a cluster-linked post.
|
|
337
|
-
* Path: Home > Article > Cluster > Article
|
|
338
|
-
*/
|
|
339
|
-
export declare function generateClusterBreadcrumbSchema(post: ArticleRecord, cluster: TopicCluster, options?: PublicationRoutingOptions & {
|
|
340
|
-
siteUrl?: string;
|
|
341
|
-
siteName?: string;
|
|
342
|
-
}): object;
|
|
343
|
-
/**
|
|
344
|
-
* Generate CollectionPage schema for a cluster landing page.
|
|
345
|
-
*/
|
|
346
|
-
export declare function generateClusterLandingSchema(cluster: TopicCluster, options?: PublicationRoutingOptions & {
|
|
347
|
-
siteUrl?: string;
|
|
348
|
-
siteName?: string;
|
|
349
|
-
}): object;
|
|
350
|
-
/**
|
|
351
|
-
* Generate metadata for a cluster landing page (Next.js generateMetadata).
|
|
352
|
-
*/
|
|
353
|
-
export declare function generateClusterPageMetadata(clusterSlug: string, options?: PublicationRoutingOptions & {
|
|
354
|
-
siteName?: string;
|
|
355
|
-
siteUrl?: string;
|
|
356
|
-
}): Promise<{
|
|
357
|
-
title?: undefined;
|
|
358
|
-
description?: undefined;
|
|
359
|
-
openGraph?: undefined;
|
|
360
|
-
} | {
|
|
361
|
-
title: string;
|
|
362
|
-
description: string;
|
|
363
|
-
openGraph: {
|
|
364
|
-
title: string;
|
|
365
|
-
description: string;
|
|
366
|
-
url: string;
|
|
367
|
-
type: string;
|
|
368
|
-
};
|
|
369
|
-
}>;
|
|
370
|
-
/**
|
|
371
|
-
* Generate "Related Insights" section data
|
|
372
|
-
*/
|
|
373
|
-
export declare function getRelatedInsights(currentSlug: string, options?: {
|
|
374
|
-
limit?: number;
|
|
375
|
-
category?: string; /** Sub-site host override (see getArticle). */
|
|
376
|
-
site?: string;
|
|
377
|
-
}): Promise<ArticleRecord[]>;
|
|
378
|
-
/**
|
|
379
|
-
* Generate BreadcrumbList schema for article navigation
|
|
380
|
-
*/
|
|
381
|
-
export declare function generateBreadcrumbSchema(post: ArticleRecord, options?: PublicationRoutingOptions & {
|
|
382
|
-
siteUrl?: string;
|
|
383
|
-
siteName?: string;
|
|
384
|
-
}): object;
|
|
385
|
-
/**
|
|
386
|
-
* Generate all relevant schemas for an article in a single array
|
|
387
|
-
* This is the recommended way to include multiple schemas.
|
|
388
|
-
* When post has E-E-A-T schema (post.schema), use it instead of generating Article/FAQ.
|
|
389
|
-
*/
|
|
390
|
-
export declare function generateAllArticleSchemas(post: ArticleRecord, options?: PublicationRoutingOptions & {
|
|
391
|
-
siteUrl?: string;
|
|
392
|
-
siteName?: string;
|
|
393
|
-
logoUrl?: string;
|
|
394
|
-
}): object[];
|
|
395
|
-
/**
|
|
396
|
-
* Fetch a single author by slug
|
|
397
|
-
*/
|
|
398
|
-
export declare function getAuthorBySlug(slug: string, options?: {
|
|
399
|
-
site?: string;
|
|
400
|
-
}): Promise<ArticleAuthor | null>;
|
|
401
|
-
/**
|
|
402
|
-
* Fetch an author's posts by slug.
|
|
403
|
-
*
|
|
404
|
-
* `offset` pages through the controller's existing offset support. Older API
|
|
405
|
-
* versions return a stripped `{name, slug}` author on this endpoint; when
|
|
406
|
-
* that shape is detected the full author row is hydrated via getAuthorBySlug
|
|
407
|
-
* (both fetches revalidate:60, so the extra hop is cached and disappears once
|
|
408
|
-
* the API returns the full row itself).
|
|
409
|
-
*/
|
|
410
|
-
export declare function getAuthorPosts(slug: string, limit?: number, offset?: number, options?: {
|
|
411
|
-
site?: string;
|
|
412
|
-
}): Promise<{
|
|
413
|
-
author: ArticleAuthor | null;
|
|
414
|
-
posts: ArticleRecord[];
|
|
415
|
-
total: number;
|
|
416
|
-
}>;
|
|
417
|
-
/**
|
|
418
|
-
* Fetch all author slugs for static generation
|
|
419
|
-
*/
|
|
420
|
-
export declare function getAllAuthorSlugs(): Promise<{
|
|
421
|
-
slug: string;
|
|
422
|
-
}[]>;
|
|
423
|
-
/**
|
|
424
|
-
* Generate static params for author pages. Takes no arguments, so it can be
|
|
425
|
-
* exported directly:
|
|
426
|
-
*
|
|
427
|
-
* export const generateStaticParams = generateAuthorStaticParams
|
|
428
|
-
*/
|
|
429
|
-
export declare function generateAuthorStaticParams(): Promise<{
|
|
430
|
-
slug: string;
|
|
431
|
-
}[]>;
|
|
432
|
-
/**
|
|
433
|
-
* Generate Next.js Metadata for an author page
|
|
434
|
-
*/
|
|
435
|
-
export declare function generateAuthorPageMetadata(author: ArticleAuthor, options?: PublicationRoutingOptions & {
|
|
436
|
-
siteUrl?: string;
|
|
437
|
-
siteName?: string;
|
|
438
|
-
}): Metadata;
|
|
439
|
-
/**
|
|
440
|
-
* Author JSON-LD: `generateAuthorSchema` (the author page's ProfilePage with
|
|
441
|
-
* the Person as mainEntity), `generateAuthorPersonSchema` (the bare Person for
|
|
442
|
-
* embedding), `generateArticleAuthorNode` (an article byline) and
|
|
443
|
-
* `authorEntityId` (the Person @id rule).
|
|
444
|
-
*
|
|
445
|
-
* The implementation lives in `./author-schema` because it is pure, and
|
|
446
|
-
* `AuthorPage` — which is exported from the client-stamped `articles` barrel —
|
|
447
|
-
* needs it. Importing it from here instead would drag this entire server module
|
|
448
|
-
* into the browser bundle. Re-exported so `@sonordev/site-kit/articles/server`
|
|
449
|
-
* keeps its existing public API.
|
|
450
|
-
*/
|
|
451
|
-
export { authorEntityId, generateArticleAuthorNode, generateAuthorPersonSchema, generateAuthorSchema, withArticleAuthorIdentity, type AuthorSchemaOptions, } from './author-schema';
|
|
452
|
-
/** Sonor article document shape (alias of `Article` from `./types`) */
|
|
453
|
-
export type { Article as ArticleRecord } from './types';
|
|
454
|
-
export { articleCategorySlug, createPublicationRoutes, resolveArticleUrl, resolvePublicationUrl } from './routes';
|
|
455
|
-
export type { ArticleRoutePost, PublicationRoutingOptions } from './routes';
|
|
456
|
-
export { resolveArticleArtwork } from './artwork';
|
|
457
|
-
export { wrapArticleTables, articleTableCss } from './article-tables';
|
|
458
|
-
export { insertArticlePhotos, articlePhotoCss } from './article-photos';
|
|
459
|
-
export type { ArticleEditorialPhoto } from './types';
|
|
460
|
-
export { FEED_DEFAULT_ITEMS, NEWS_SITEMAP_MAX_URLS, NEWS_SITEMAP_WINDOW_MS, buildNewsSitemapXml, cdata, recentNewsPosts } from './news-sitemap';
|
|
461
|
-
export type { NewsSitemapOptions, NewsSitemapPost } from './news-sitemap';
|
|
1
|
+
/** @deprecated Import from @sonordev/press-kit instead. Compatibility build uses the same canonical source. */
|
|
2
|
+
export * from '../press-kit/articles/server-core';
|