@sonordev/site-kit 5.8.2 → 6.0.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/README.md +11 -11
- package/agent-manifest.json +22 -11
- package/dist/{AnalyticsProvider-LUEUDZZC.mjs → AnalyticsProvider-6QVM2B6O.mjs} +6 -6
- package/dist/{AnalyticsProvider-LUEUDZZC.mjs.map → AnalyticsProvider-6QVM2B6O.mjs.map} +1 -1
- package/dist/{AnalyticsProvider-4JV3OFCG.js → AnalyticsProvider-AZQXLRWN.js} +10 -10
- package/dist/{AnalyticsProvider-4JV3OFCG.js.map → AnalyticsProvider-AZQXLRWN.js.map} +1 -1
- package/dist/ArticleFaqSection-3KZ24MFS.js +13 -0
- package/dist/ArticleFaqSection-3KZ24MFS.js.map +1 -0
- package/dist/ArticleFaqSection-XZPXJVH4.mjs +11 -0
- package/dist/ArticleFaqSection-XZPXJVH4.mjs.map +1 -0
- package/dist/{BlogViewTracker-YQMTEGYZ.mjs → ArticleViewTracker-AEWJMXQQ.mjs} +13 -13
- package/dist/ArticleViewTracker-AEWJMXQQ.mjs.map +1 -0
- package/dist/{BlogViewTracker-32C4SCHA.js → ArticleViewTracker-CFBTQ46B.js} +16 -16
- package/dist/ArticleViewTracker-CFBTQ46B.js.map +1 -0
- package/dist/ChatWidget-6626OPXO.mjs +15 -0
- package/dist/{ChatWidget-IRTAMRQS.mjs.map → ChatWidget-6626OPXO.mjs.map} +1 -1
- package/dist/ChatWidget-U24AYLXF.js +24 -0
- package/dist/{ChatWidget-KCXQXNUF.js.map → ChatWidget-U24AYLXF.js.map} +1 -1
- package/dist/EngageWidget-TR47W2ZI.mjs +12 -0
- package/dist/{EngageWidget-7AIUJRXV.mjs.map → EngageWidget-TR47W2ZI.mjs.map} +1 -1
- package/dist/EngageWidget-XUTDFRF3.js +21 -0
- package/dist/{EngageWidget-EUUZHQOU.js.map → EngageWidget-XUTDFRF3.js.map} +1 -1
- package/dist/{FileField-XJYJO5HE.mjs → FileField-DNNC5IPS.mjs} +5 -5
- package/dist/{FileField-XJYJO5HE.mjs.map → FileField-DNNC5IPS.mjs.map} +1 -1
- package/dist/{FileField-SNI5XCHQ.js → FileField-R4RQG77G.js} +6 -6
- package/dist/{FileField-SNI5XCHQ.js.map → FileField-R4RQG77G.js.map} +1 -1
- package/dist/{FormSpotlight-S64G4CMM.js → FormSpotlight-7ILRAD3W.js} +9 -9
- package/dist/{FormSpotlight-S64G4CMM.js.map → FormSpotlight-7ILRAD3W.js.map} +1 -1
- package/dist/{FormSpotlight-BCXI4A4R.mjs → FormSpotlight-MXY4I46H.mjs} +3 -3
- package/dist/{FormSpotlight-BCXI4A4R.mjs.map → FormSpotlight-MXY4I46H.mjs.map} +1 -1
- package/dist/{FormStage-PX5TVY25.js → FormStage-CVD3I3SE.js} +9 -9
- package/dist/{FormStage-PX5TVY25.js.map → FormStage-CVD3I3SE.js.map} +1 -1
- package/dist/{FormStage-RHARCSPS.mjs → FormStage-FDJGRGEU.mjs} +3 -3
- package/dist/{FormStage-RHARCSPS.mjs.map → FormStage-FDJGRGEU.mjs.map} +1 -1
- package/dist/ManagedForm-5675CLWS.mjs +16 -0
- package/dist/{ManagedForm-7IDXBQS6.mjs.map → ManagedForm-5675CLWS.mjs.map} +1 -1
- package/dist/ManagedForm-KYIK54SL.js +25 -0
- package/dist/{ManagedForm-RI2TSUZD.js.map → ManagedForm-KYIK54SL.js.map} +1 -1
- package/dist/{ManagedNewsletterForm-UXBJ5OJB.mjs → ManagedNewsletterForm-DFLDGNQU.mjs} +11 -11
- package/dist/ManagedNewsletterForm-DFLDGNQU.mjs.map +1 -0
- package/dist/{ManagedNewsletterForm-IAGIHBNT.js → ManagedNewsletterForm-IH3MRJOD.js} +13 -13
- package/dist/ManagedNewsletterForm-IH3MRJOD.js.map +1 -0
- package/dist/{SignalCore-Q2BQMPCJ.js → SignalCore-6LYIZFXK.js} +11 -11
- package/dist/{SignalCore-Q2BQMPCJ.js.map → SignalCore-6LYIZFXK.js.map} +1 -1
- package/dist/{SignalCore-37WGILFY.mjs → SignalCore-ZH3R6XD3.mjs} +5 -5
- package/dist/{SignalCore-37WGILFY.mjs.map → SignalCore-ZH3R6XD3.mjs.map} +1 -1
- package/dist/SitemapSync-PKBXWVI6.mjs +9 -0
- package/dist/{SitemapSync-YIAI7PMT.mjs.map → SitemapSync-PKBXWVI6.mjs.map} +1 -1
- package/dist/SitemapSync-PZ76V5MX.js +18 -0
- package/dist/{SitemapSync-DWEL7HTB.js.map → SitemapSync-PZ76V5MX.js.map} +1 -1
- package/dist/analytics/index.js +9 -9
- package/dist/analytics/index.mjs +4 -4
- package/dist/{blog-styles-7AKRUMV7.mjs → article-styles-DACUAOVT.mjs} +124 -124
- package/dist/article-styles-DACUAOVT.mjs.map +1 -0
- package/dist/{blog-styles-6EY3BS5Y.js → article-styles-JHHTNHOK.js} +125 -125
- package/dist/article-styles-JHHTNHOK.js.map +1 -0
- package/dist/article-tables-EWXG4LNP.js +17 -0
- package/dist/article-tables-EWXG4LNP.js.map +1 -0
- package/dist/article-tables-OGE52LNT.mjs +4 -0
- package/dist/article-tables-OGE52LNT.mjs.map +1 -0
- package/dist/{blog/BlogPost.d.ts → articles/Article.d.ts} +18 -16
- package/dist/articles/Article.d.ts.map +1 -0
- package/dist/{blog/BlogFAQ.d.ts → articles/ArticleFAQ.d.ts} +6 -6
- package/dist/articles/ArticleFAQ.d.ts.map +1 -0
- package/dist/articles/ArticleFaqSection.d.ts +3 -0
- package/dist/articles/ArticleFaqSection.d.ts.map +1 -0
- package/dist/{blog/BlogList.d.ts → articles/ArticleList.d.ts} +16 -16
- package/dist/articles/ArticleList.d.ts.map +1 -0
- package/dist/{blog/BlogViewTracker.d.ts → articles/ArticleViewTracker.d.ts} +4 -4
- package/dist/articles/ArticleViewTracker.d.ts.map +1 -0
- package/dist/{blog → articles}/AuthorCard.d.ts +3 -3
- package/dist/articles/AuthorCard.d.ts.map +1 -0
- package/dist/{blog → articles}/AuthorPage.d.ts +1 -1
- package/dist/articles/AuthorPage.d.ts.map +1 -0
- package/dist/{blog → articles}/ClusterLandingPage.d.ts +6 -6
- package/dist/articles/ClusterLandingPage.d.ts.map +1 -0
- package/dist/{blog → articles}/ClusterNavigation.d.ts +5 -5
- package/dist/articles/ClusterNavigation.d.ts.map +1 -0
- package/dist/{blog → articles}/ManagedNewsletterForm.d.ts +1 -1
- package/dist/articles/ManagedNewsletterForm.d.ts.map +1 -0
- package/dist/{blog → articles}/NewsletterShell.d.ts +1 -1
- package/dist/articles/NewsletterShell.d.ts.map +1 -0
- package/dist/{blog → articles}/NewsletterWidget.d.ts +4 -4
- package/dist/articles/NewsletterWidget.d.ts.map +1 -0
- package/dist/{blog/BlogLayout.d.ts → articles/PublicationLayout.d.ts} +18 -18
- package/dist/articles/PublicationLayout.d.ts.map +1 -0
- package/dist/{blog/BlogSidebar.d.ts → articles/PublicationSidebar.d.ts} +8 -8
- package/dist/articles/PublicationSidebar.d.ts.map +1 -0
- package/dist/{blog → articles}/RelatedPosts.d.ts +6 -6
- package/dist/articles/RelatedPosts.d.ts.map +1 -0
- package/dist/{blog → articles}/ServiceCallout.d.ts +4 -4
- package/dist/articles/ServiceCallout.d.ts.map +1 -0
- package/dist/{blog → articles}/TableOfContents.d.ts +1 -1
- package/dist/articles/TableOfContents.d.ts.map +1 -0
- package/dist/{blog/blog-styles.d.ts → articles/article-styles.d.ts} +5 -5
- package/dist/articles/article-styles.d.ts.map +1 -0
- package/dist/{blog/blog-tables.d.ts → articles/article-tables.d.ts} +4 -4
- package/dist/articles/article-tables.d.ts.map +1 -0
- package/dist/articles/artwork.d.ts +14 -0
- package/dist/articles/artwork.d.ts.map +1 -0
- package/dist/{blog → articles}/author-schema.d.ts +6 -5
- package/dist/articles/author-schema.d.ts.map +1 -0
- package/dist/{blog → articles}/author-social.d.ts +2 -2
- package/dist/articles/author-social.d.ts.map +1 -0
- package/dist/{blog → articles}/excerpt.d.ts +2 -2
- package/dist/articles/excerpt.d.ts.map +1 -0
- package/dist/{blog → articles}/index.d.ts +26 -31
- package/dist/articles/index.d.ts.map +1 -0
- package/dist/{blog → articles}/index.js +39 -73
- package/dist/articles/index.js.map +1 -0
- package/dist/{blog → articles}/index.mjs +16 -17
- package/dist/articles/index.mjs.map +1 -0
- package/dist/articles/news-sitemap.d.ts +47 -0
- package/dist/articles/news-sitemap.d.ts.map +1 -0
- package/dist/{blog/processBlogHtml.d.ts → articles/processArticleHtml.d.ts} +4 -4
- package/dist/articles/processArticleHtml.d.ts.map +1 -0
- package/dist/articles/public-reads.d.ts +27 -0
- package/dist/articles/public-reads.d.ts.map +1 -0
- package/dist/{blog → articles}/reading-time.d.ts +2 -2
- package/dist/articles/reading-time.d.ts.map +1 -0
- package/dist/{blog → articles}/routes.d.ts +16 -12
- package/dist/articles/routes.d.ts.map +1 -0
- package/dist/{blog → articles}/server-core.d.ts +94 -81
- package/dist/articles/server-core.d.ts.map +1 -0
- package/dist/articles/server-ui.d.ts +29 -0
- package/dist/articles/server-ui.d.ts.map +1 -0
- package/dist/{chunk-KPWK23G7.js → articles/server-ui.js} +378 -499
- package/dist/articles/server-ui.js.map +1 -0
- package/dist/{chunk-RA4DCRMR.mjs → articles/server-ui.mjs} +328 -474
- package/dist/articles/server-ui.mjs.map +1 -0
- package/dist/{blog → articles}/server.d.ts +94 -81
- package/dist/articles/server.d.ts.map +1 -0
- package/dist/articles/server.js +236 -0
- package/dist/articles/server.mjs +11 -0
- package/dist/{blog → articles}/types.d.ts +34 -34
- package/dist/articles/types.d.ts.map +1 -0
- package/dist/articles/widget-styles.d.ts +9 -0
- package/dist/articles/widget-styles.d.ts.map +1 -0
- package/dist/brand/extract-brand-profile.d.ts +1 -1
- package/dist/{chunk-DTWR7VRQ.js → chunk-254IW4FC.js} +9 -9
- package/dist/{chunk-DTWR7VRQ.js.map → chunk-254IW4FC.js.map} +1 -1
- package/dist/chunk-2KRAY5NC.mjs +6 -0
- package/dist/{chunk-TAPCWMBV.mjs.map → chunk-2KRAY5NC.mjs.map} +1 -1
- package/dist/{chunk-X6NPTILR.mjs → chunk-2WEBUZNP.mjs} +3 -3
- package/dist/{chunk-X6NPTILR.mjs.map → chunk-2WEBUZNP.mjs.map} +1 -1
- package/dist/{chunk-3EXBBFXX.mjs → chunk-2YSB4FIC.mjs} +4 -4
- package/dist/{chunk-3EXBBFXX.mjs.map → chunk-2YSB4FIC.mjs.map} +1 -1
- package/dist/{chunk-GDH42JAS.js → chunk-3GHPFLEH.js} +15 -15
- package/dist/{chunk-GDH42JAS.js.map → chunk-3GHPFLEH.js.map} +1 -1
- package/dist/{chunk-QWXTQC3N.js → chunk-3LCJJ6Y6.js} +3 -3
- package/dist/{chunk-QWXTQC3N.js.map → chunk-3LCJJ6Y6.js.map} +1 -1
- package/dist/{chunk-YVQNOB3Q.mjs → chunk-3OCXVTN5.mjs} +3 -3
- package/dist/{chunk-YVQNOB3Q.mjs.map → chunk-3OCXVTN5.mjs.map} +1 -1
- package/dist/chunk-3T2CVHFO.mjs +453 -0
- package/dist/chunk-3T2CVHFO.mjs.map +1 -0
- package/dist/{chunk-ZDXY44FH.js → chunk-3U5SVB4W.js} +4 -4
- package/dist/{chunk-ZDXY44FH.js.map → chunk-3U5SVB4W.js.map} +1 -1
- package/dist/{chunk-I3ND4XYW.js → chunk-4BEGKFMN.js} +8 -8
- package/dist/{chunk-I3ND4XYW.js.map → chunk-4BEGKFMN.js.map} +1 -1
- package/dist/{chunk-YFX3Q56O.mjs → chunk-4KAMU5HD.mjs} +3 -3
- package/dist/chunk-4KAMU5HD.mjs.map +1 -0
- package/dist/{chunk-ZPLN537Q.mjs → chunk-4WCA2HM6.mjs} +2 -2
- package/dist/chunk-4WCA2HM6.mjs.map +1 -0
- package/dist/{chunk-PXWYMOZY.js → chunk-5DSUPTBU.js} +13 -13
- package/dist/{chunk-PXWYMOZY.js.map → chunk-5DSUPTBU.js.map} +1 -1
- package/dist/{chunk-GHECYDSZ.mjs → chunk-5F2FIM5A.mjs} +16 -15
- package/dist/chunk-5F2FIM5A.mjs.map +1 -0
- package/dist/{chunk-Y5QZPUL3.mjs → chunk-5YVQWLSQ.mjs} +5 -5
- package/dist/chunk-5YVQWLSQ.mjs.map +1 -0
- package/dist/chunk-6DCAMW62.mjs +55 -0
- package/dist/chunk-6DCAMW62.mjs.map +1 -0
- package/dist/{chunk-Q2NBD54V.js → chunk-7THQ4UW3.js} +2 -2
- package/dist/chunk-7THQ4UW3.js.map +1 -0
- package/dist/{chunk-6FTC6EYD.mjs → chunk-7TKSRUQU.mjs} +7 -7
- package/dist/{chunk-6FTC6EYD.mjs.map → chunk-7TKSRUQU.mjs.map} +1 -1
- package/dist/{chunk-4TLFZ6NR.mjs → chunk-AS2HUIDW.mjs} +3 -3
- package/dist/chunk-AS2HUIDW.mjs.map +1 -0
- package/dist/{chunk-YN7QHLWF.js → chunk-BBBJHYPH.js} +5 -5
- package/dist/chunk-BBBJHYPH.js.map +1 -0
- package/dist/{chunk-3Y7IKQDD.js → chunk-BZG34WHF.js} +14 -14
- package/dist/{chunk-3Y7IKQDD.js.map → chunk-BZG34WHF.js.map} +1 -1
- package/dist/{chunk-4LYW6PMU.mjs → chunk-C2CTLLIO.mjs} +3 -3
- package/dist/chunk-C2CTLLIO.mjs.map +1 -0
- package/dist/{chunk-O237KKCX.mjs → chunk-C5VITBN7.mjs} +5 -5
- package/dist/chunk-C5VITBN7.mjs.map +1 -0
- package/dist/{chunk-75A4KY4X.mjs → chunk-CFRJ2MK5.mjs} +2 -2
- package/dist/chunk-CFRJ2MK5.mjs.map +1 -0
- package/dist/{chunk-G2WC3CXW.js → chunk-CLO3K7PF.js} +2 -2
- package/dist/chunk-CLO3K7PF.js.map +1 -0
- package/dist/{chunk-ALVQOG4M.mjs → chunk-CSSNZGTU.mjs} +4 -4
- package/dist/{chunk-ALVQOG4M.mjs.map → chunk-CSSNZGTU.mjs.map} +1 -1
- package/dist/{chunk-U6O5NG56.js → chunk-CZGGUPPQ.js} +15 -15
- package/dist/{chunk-U6O5NG56.js.map → chunk-CZGGUPPQ.js.map} +1 -1
- package/dist/{chunk-U5WMGUDV.js → chunk-D47W5DE4.js} +4 -4
- package/dist/{chunk-U5WMGUDV.js.map → chunk-D47W5DE4.js.map} +1 -1
- package/dist/{chunk-AK6JZ3OE.mjs → chunk-EDLNMGQC.mjs} +3 -3
- package/dist/{chunk-DO6ATNLN.js.map → chunk-EDLNMGQC.mjs.map} +1 -1
- package/dist/chunk-EL74YDNX.js +8 -0
- package/dist/{chunk-TJVZEDE3.js.map → chunk-EL74YDNX.js.map} +1 -1
- package/dist/{chunk-HX6ZG3PP.js → chunk-EMHSHAVW.js} +3 -3
- package/dist/chunk-EMHSHAVW.js.map +1 -0
- package/dist/{chunk-7TC3GRXQ.js → chunk-G6KQ3C3W.js} +25 -23
- package/dist/chunk-G6KQ3C3W.js.map +1 -0
- package/dist/{chunk-4PXUMDHL.mjs → chunk-GQ3SDRL6.mjs} +4 -4
- package/dist/{chunk-4PXUMDHL.mjs.map → chunk-GQ3SDRL6.mjs.map} +1 -1
- package/dist/{chunk-73EBIAF3.js → chunk-HFCQGSD2.js} +18 -18
- package/dist/{chunk-73EBIAF3.js.map → chunk-HFCQGSD2.js.map} +1 -1
- package/dist/{chunk-XZO5I4RS.mjs → chunk-HIZJD7TU.mjs} +3 -3
- package/dist/{chunk-XZO5I4RS.mjs.map → chunk-HIZJD7TU.mjs.map} +1 -1
- package/dist/{chunk-AUTJQGZ2.mjs → chunk-HOOVYWTO.mjs} +4 -4
- package/dist/{chunk-AUTJQGZ2.mjs.map → chunk-HOOVYWTO.mjs.map} +1 -1
- package/dist/{chunk-LUF22UGR.js → chunk-HX5JPNMN.js} +8 -8
- package/dist/{chunk-LUF22UGR.js.map → chunk-HX5JPNMN.js.map} +1 -1
- package/dist/chunk-HXHRS3PX.mjs +349 -0
- package/dist/chunk-HXHRS3PX.mjs.map +1 -0
- package/dist/{chunk-XBX2K3GA.js → chunk-IBJOGXQI.js} +4 -4
- package/dist/{chunk-XBX2K3GA.js.map → chunk-IBJOGXQI.js.map} +1 -1
- package/dist/{chunk-NHX6YJ7G.mjs → chunk-JMNBU2RG.mjs} +9 -9
- package/dist/{chunk-NHX6YJ7G.mjs.map → chunk-JMNBU2RG.mjs.map} +1 -1
- package/dist/{chunk-R7GHP3FY.js → chunk-JONWE26J.js} +3 -3
- package/dist/chunk-JONWE26J.js.map +1 -0
- package/dist/{chunk-HOJ4J4X2.mjs → chunk-JSXLTZUP.mjs} +6 -6
- package/dist/{chunk-HOJ4J4X2.mjs.map → chunk-JSXLTZUP.mjs.map} +1 -1
- package/dist/{chunk-5BZNVKNK.mjs → chunk-JXCMCASE.mjs} +3 -3
- package/dist/{chunk-5BZNVKNK.mjs.map → chunk-JXCMCASE.mjs.map} +1 -1
- package/dist/{chunk-F2ZFMPW4.js → chunk-KA4NNWOK.js} +10 -10
- package/dist/{chunk-F2ZFMPW4.js.map → chunk-KA4NNWOK.js.map} +1 -1
- package/dist/{chunk-K4TCEAUX.js → chunk-KR7ATPAN.js} +5 -5
- package/dist/chunk-KR7ATPAN.js.map +1 -0
- package/dist/{chunk-JLVCWC6A.mjs → chunk-KZVSB5WE.mjs} +2 -2
- package/dist/chunk-KZVSB5WE.mjs.map +1 -0
- package/dist/chunk-LWCAZDY2.js +355 -0
- package/dist/chunk-LWCAZDY2.js.map +1 -0
- package/dist/{chunk-D7CF3OPZ.js → chunk-MCG4BSRW.js} +5 -5
- package/dist/{chunk-D7CF3OPZ.js.map → chunk-MCG4BSRW.js.map} +1 -1
- package/dist/{chunk-OBNMSO66.js → chunk-MIYGP34I.js} +14 -14
- package/dist/{chunk-OBNMSO66.js.map → chunk-MIYGP34I.js.map} +1 -1
- package/dist/{chunk-PXK4WNSU.js → chunk-MS2EE6LT.js} +10 -10
- package/dist/{chunk-PXK4WNSU.js.map → chunk-MS2EE6LT.js.map} +1 -1
- package/dist/{chunk-JR2FT6T5.js → chunk-N6CB7MK7.js} +6 -6
- package/dist/{chunk-JR2FT6T5.js.map → chunk-N6CB7MK7.js.map} +1 -1
- package/dist/{chunk-LMEUYRRR.js → chunk-NAA5J2JM.js} +233 -120
- package/dist/chunk-NAA5J2JM.js.map +1 -0
- package/dist/{chunk-OE7CTIOU.mjs → chunk-NE6QGHFT.mjs} +4 -4
- package/dist/{chunk-OE7CTIOU.mjs.map → chunk-NE6QGHFT.mjs.map} +1 -1
- package/dist/{chunk-SCVSPTXJ.mjs → chunk-NR52QHOD.mjs} +3 -3
- package/dist/{chunk-SCVSPTXJ.mjs.map → chunk-NR52QHOD.mjs.map} +1 -1
- package/dist/{chunk-GQF6QAQS.js → chunk-OGNX6JT4.js} +5 -5
- package/dist/chunk-OGNX6JT4.js.map +1 -0
- package/dist/{chunk-FVW6FT6L.js → chunk-OSU4QA5M.js} +8 -8
- package/dist/{chunk-FVW6FT6L.js.map → chunk-OSU4QA5M.js.map} +1 -1
- package/dist/{chunk-RI25UGHE.mjs → chunk-PJYTYM5G.mjs} +3 -3
- package/dist/{chunk-RI25UGHE.mjs.map → chunk-PJYTYM5G.mjs.map} +1 -1
- package/dist/{chunk-DO6ATNLN.js → chunk-PRAHDLKT.js} +5 -5
- package/dist/chunk-PRAHDLKT.js.map +1 -0
- package/dist/{chunk-RQOKQC7J.mjs → chunk-QEM2F2DC.mjs} +3 -3
- package/dist/{chunk-RQOKQC7J.mjs.map → chunk-QEM2F2DC.mjs.map} +1 -1
- package/dist/{chunk-3Z3TOPND.js → chunk-QOCLSJIU.js} +3 -3
- package/dist/{chunk-3Z3TOPND.js.map → chunk-QOCLSJIU.js.map} +1 -1
- package/dist/{chunk-AHKVOYFO.mjs → chunk-QVBAAPNT.mjs} +3 -3
- package/dist/{chunk-AHKVOYFO.mjs.map → chunk-QVBAAPNT.mjs.map} +1 -1
- package/dist/{chunk-FWFJZV52.mjs → chunk-RC4L4DV2.mjs} +4 -4
- package/dist/{chunk-FWFJZV52.mjs.map → chunk-RC4L4DV2.mjs.map} +1 -1
- package/dist/{chunk-ZVI7MBVF.mjs → chunk-RDPI27TS.mjs} +12 -10
- package/dist/chunk-RDPI27TS.mjs.map +1 -0
- package/dist/{chunk-OEW2LFOV.js → chunk-RLUNEEGM.js} +4 -4
- package/dist/{chunk-OEW2LFOV.js.map → chunk-RLUNEEGM.js.map} +1 -1
- package/dist/{chunk-TCVOGK6U.mjs → chunk-RPCODOWG.mjs} +3 -3
- package/dist/{chunk-TCVOGK6U.mjs.map → chunk-RPCODOWG.mjs.map} +1 -1
- package/dist/{chunk-QK54SZPF.mjs → chunk-RZGVNDO6.mjs} +4 -4
- package/dist/{chunk-QK54SZPF.mjs.map → chunk-RZGVNDO6.mjs.map} +1 -1
- package/dist/{chunk-GKVEWOYN.js → chunk-SCRB5DZM.js} +8 -8
- package/dist/{chunk-GKVEWOYN.js.map → chunk-SCRB5DZM.js.map} +1 -1
- package/dist/{chunk-YQTE32QK.js → chunk-SG7CWD2R.js} +17 -16
- package/dist/chunk-SG7CWD2R.js.map +1 -0
- package/dist/chunk-TBXWJJGT.js +468 -0
- package/dist/chunk-TBXWJJGT.js.map +1 -0
- package/dist/{chunk-SJPI34DL.mjs → chunk-TCCGP3FT.mjs} +3 -3
- package/dist/{chunk-SJPI34DL.mjs.map → chunk-TCCGP3FT.mjs.map} +1 -1
- package/dist/{chunk-7BI2RVQD.js → chunk-TCZHRSWY.js} +4 -4
- package/dist/{chunk-7BI2RVQD.js.map → chunk-TCZHRSWY.js.map} +1 -1
- package/dist/{chunk-M45AL7EA.js → chunk-TST2IKYO.js} +14 -14
- package/dist/{chunk-M45AL7EA.js.map → chunk-TST2IKYO.js.map} +1 -1
- package/dist/{chunk-U2V542EO.mjs → chunk-UHYRVALN.mjs} +2 -2
- package/dist/{chunk-U2V542EO.mjs.map → chunk-UHYRVALN.mjs.map} +1 -1
- package/dist/{chunk-4L7OHRWB.mjs → chunk-UO6KTHBQ.mjs} +4 -4
- package/dist/{chunk-4L7OHRWB.mjs.map → chunk-UO6KTHBQ.mjs.map} +1 -1
- package/dist/{chunk-H5NBFNND.js → chunk-UZKXOZHR.js} +2 -2
- package/dist/chunk-UZKXOZHR.js.map +1 -0
- package/dist/{chunk-ZTY4YS7Q.js → chunk-VINLIMAX.js} +3 -3
- package/dist/{chunk-ZTY4YS7Q.js.map → chunk-VINLIMAX.js.map} +1 -1
- package/dist/{chunk-YC2CKOX6.js → chunk-WDEGGHTB.js} +12 -12
- package/dist/{chunk-YC2CKOX6.js.map → chunk-WDEGGHTB.js.map} +1 -1
- package/dist/{chunk-OX2GTNMB.mjs → chunk-WV5YQL3W.mjs} +3 -3
- package/dist/{chunk-OX2GTNMB.mjs.map → chunk-WV5YQL3W.mjs.map} +1 -1
- package/dist/{chunk-3EY5E35M.mjs → chunk-X3MY4PL7.mjs} +210 -107
- package/dist/chunk-X3MY4PL7.mjs.map +1 -0
- package/dist/{chunk-7SLYI62M.mjs → chunk-XKXZ4OW4.mjs} +4 -4
- package/dist/{chunk-7SLYI62M.mjs.map → chunk-XKXZ4OW4.mjs.map} +1 -1
- package/dist/{chunk-FX232N4P.mjs → chunk-XSBKR3VF.mjs} +5 -5
- package/dist/{chunk-FX232N4P.mjs.map → chunk-XSBKR3VF.mjs.map} +1 -1
- package/dist/{chunk-SEP5D4MI.js → chunk-Y2CP5J6Q.js} +2 -2
- package/dist/{chunk-SEP5D4MI.js.map → chunk-Y2CP5J6Q.js.map} +1 -1
- package/dist/{chunk-HQ2EPU5R.js → chunk-YGDQVZEL.js} +7 -7
- package/dist/{chunk-HQ2EPU5R.js.map → chunk-YGDQVZEL.js.map} +1 -1
- package/dist/{chunk-KV7XXLJV.mjs → chunk-YPGUV6BT.mjs} +3 -3
- package/dist/{chunk-KV7XXLJV.mjs.map → chunk-YPGUV6BT.mjs.map} +1 -1
- package/dist/chunk-YRCR7WY3.js +65 -0
- package/dist/chunk-YRCR7WY3.js.map +1 -0
- package/dist/{chunk-NM567VXC.mjs → chunk-YWLBQ3L5.mjs} +4 -4
- package/dist/{chunk-NM567VXC.mjs.map → chunk-YWLBQ3L5.mjs.map} +1 -1
- package/dist/{chunk-3HGHWDCY.js → chunk-YYEBFQGS.js} +4 -4
- package/dist/{chunk-3HGHWDCY.js.map → chunk-YYEBFQGS.js.map} +1 -1
- package/dist/chunk-ZL35JCDA.mjs +61 -0
- package/dist/chunk-ZL35JCDA.mjs.map +1 -0
- package/dist/chunk-ZR43XFUM.js +60 -0
- package/dist/chunk-ZR43XFUM.js.map +1 -0
- package/dist/{chunk-EZ5DX7ED.mjs → chunk-ZR4TYCQW.mjs} +3 -3
- package/dist/{chunk-EZ5DX7ED.mjs.map → chunk-ZR4TYCQW.mjs.map} +1 -1
- package/dist/cli/commands/setup.d.ts +2 -2
- package/dist/cli/commands/sync.d.ts +2 -2
- package/dist/cli/commands/sync.d.ts.map +1 -1
- package/dist/cli/index.js +76 -76
- package/dist/cli/index.mjs +29 -29
- package/dist/client/index.js +5 -5
- package/dist/client/index.mjs +4 -4
- package/dist/commerce/index.js +57 -57
- package/dist/commerce/index.mjs +5 -5
- package/dist/commerce/server.d.ts +1 -1
- package/dist/commerce/server.js +7 -7
- package/dist/commerce/server.js.map +1 -1
- package/dist/commerce/server.mjs +7 -7
- package/dist/commerce/server.mjs.map +1 -1
- package/dist/discover-LPN55L5B.js +21 -0
- package/dist/{discover-NGEPXZOD.js.map → discover-LPN55L5B.js.map} +1 -1
- package/dist/discover-QGA6QFSR.mjs +4 -0
- package/dist/{discover-CYXYKHZ2.mjs.map → discover-QGA6QFSR.mjs.map} +1 -1
- package/dist/engage/index.js +13 -13
- package/dist/engage/index.mjs +7 -7
- package/dist/fleet/contract.d.ts +1 -1
- package/dist/fleet/contract.js +12 -12
- package/dist/fleet/contract.mjs +1 -1
- package/dist/fleet/index.js +20 -20
- package/dist/fleet/index.mjs +5 -5
- package/dist/forms/index.js +21 -21
- package/dist/forms/index.mjs +10 -10
- package/dist/forms/server.js +10 -10
- package/dist/forms/server.mjs +8 -8
- package/dist/forms/static.js +7 -7
- package/dist/forms/static.mjs +6 -6
- package/dist/images/index.js +11 -11
- package/dist/images/index.mjs +4 -4
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +70 -70
- package/dist/index.mjs +12 -12
- package/dist/layout/client.js +10 -10
- package/dist/layout/client.mjs +9 -9
- package/dist/layout/index.js +12 -12
- package/dist/layout/index.mjs +10 -10
- package/dist/llms/SpeakableSchema.d.ts +1 -1
- package/dist/llms/SpeakableSchema.d.ts.map +1 -1
- package/dist/llms/client.d.ts +18 -0
- package/dist/llms/client.d.ts.map +1 -0
- package/dist/llms/client.js +66 -0
- package/dist/llms/client.js.map +1 -0
- package/dist/llms/client.mjs +5 -0
- package/dist/llms/client.mjs.map +1 -0
- package/dist/llms/generateLLMsTxt.d.ts.map +1 -1
- package/dist/llms/index.js +75 -478
- package/dist/llms/index.js.map +1 -1
- package/dist/llms/index.mjs +10 -455
- package/dist/llms/index.mjs.map +1 -1
- package/dist/llms/types.d.ts +7 -0
- package/dist/llms/types.d.ts.map +1 -1
- package/dist/maps/index.js +5 -5
- package/dist/maps/index.mjs +3 -3
- package/dist/og/index.js +7 -7
- package/dist/og/index.mjs +2 -2
- package/dist/og/route.d.ts +6 -6
- package/dist/og/route.js.map +1 -1
- package/dist/og/route.mjs.map +1 -1
- package/dist/og/wiring.d.ts +4 -4
- package/dist/og/wiring.d.ts.map +1 -1
- package/dist/proxy/index.js +5 -5
- package/dist/proxy/index.mjs +3 -3
- package/dist/redirects/index.js +10 -10
- package/dist/redirects/index.mjs +3 -3
- package/dist/redirects/not-found.js +7 -7
- package/dist/redirects/not-found.mjs +3 -3
- package/dist/robots/indexnow.d.ts +17 -0
- package/dist/robots/indexnow.d.ts.map +1 -0
- package/dist/robots/indexnow.js +39 -0
- package/dist/robots/indexnow.js.map +1 -0
- package/dist/robots/indexnow.mjs +34 -0
- package/dist/robots/indexnow.mjs.map +1 -0
- package/dist/search/contract.d.ts +1 -1
- package/dist/search/contract.js +3 -3
- package/dist/search/contract.mjs +1 -1
- package/dist/search/index.js +7 -7
- package/dist/search/index.mjs +5 -5
- package/dist/seo/ManagedSchema.d.ts.map +1 -1
- package/dist/seo/client.js +6 -6
- package/dist/seo/client.mjs +5 -5
- package/dist/seo/index.js +58 -50
- package/dist/seo/index.js.map +1 -1
- package/dist/seo/index.mjs +23 -15
- package/dist/seo/index.mjs.map +1 -1
- package/dist/seo/register-sitemap-cli.js +12 -12
- package/dist/seo/register-sitemap-cli.mjs +5 -5
- package/dist/seo/server.js +21 -21
- package/dist/seo/server.mjs +5 -5
- package/dist/server/index.js +3 -3
- package/dist/server/index.mjs +2 -2
- package/dist/{server-api-A2EFCTZX.mjs → server-api-7F5P6CSH.mjs} +6 -6
- package/dist/{server-api-A2EFCTZX.mjs.map → server-api-7F5P6CSH.mjs.map} +1 -1
- package/dist/{server-api-IWTZ7C3O.js → server-api-OC5JNK6R.js} +24 -24
- package/dist/{server-api-IWTZ7C3O.js.map → server-api-OC5JNK6R.js.map} +1 -1
- package/dist/shared/build-entries.d.ts +15 -7
- package/dist/shared/build-entries.d.ts.map +1 -1
- package/dist/shared/version.d.ts +1 -1
- package/dist/signal/index.js +11 -11
- package/dist/signal/index.mjs +2 -2
- package/dist/sitemap/discover.d.ts +1 -1
- package/dist/sitemap/index.d.ts +7 -1
- package/dist/sitemap/index.d.ts.map +1 -1
- package/dist/sitemap/index.js +47 -30
- package/dist/sitemap/index.js.map +1 -1
- package/dist/sitemap/index.mjs +26 -9
- package/dist/sitemap/index.mjs.map +1 -1
- package/dist/sitemap/shared.d.ts +1 -1
- package/dist/sitemap/shared.d.ts.map +1 -1
- package/dist/sites/site-param.d.ts +2 -2
- package/dist/sync/index.js +17 -17
- package/dist/sync/index.mjs +4 -4
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/writeLLMsTxt-ATADOUVZ.js +20 -0
- package/dist/writeLLMsTxt-QJFXBHZF.mjs +11 -0
- package/package.json +25 -14
- package/dist/BlogPostFaqSection-P3GXVQPA.mjs +0 -11
- package/dist/BlogPostFaqSection-P3GXVQPA.mjs.map +0 -1
- package/dist/BlogPostFaqSection-YG5J4B4U.js +0 -13
- package/dist/BlogPostFaqSection-YG5J4B4U.js.map +0 -1
- package/dist/BlogViewTracker-32C4SCHA.js.map +0 -1
- package/dist/BlogViewTracker-YQMTEGYZ.mjs.map +0 -1
- package/dist/ChatWidget-IRTAMRQS.mjs +0 -15
- package/dist/ChatWidget-KCXQXNUF.js +0 -24
- package/dist/EngageWidget-7AIUJRXV.mjs +0 -12
- package/dist/EngageWidget-EUUZHQOU.js +0 -21
- package/dist/ManagedForm-7IDXBQS6.mjs +0 -16
- package/dist/ManagedForm-RI2TSUZD.js +0 -25
- package/dist/ManagedNewsletterForm-IAGIHBNT.js.map +0 -1
- package/dist/ManagedNewsletterForm-UXBJ5OJB.mjs.map +0 -1
- package/dist/SitemapSync-DWEL7HTB.js +0 -18
- package/dist/SitemapSync-YIAI7PMT.mjs +0 -9
- package/dist/blog/AuthorCard.d.ts.map +0 -1
- package/dist/blog/AuthorPage.d.ts.map +0 -1
- package/dist/blog/BlogFAQ.d.ts.map +0 -1
- package/dist/blog/BlogLayout.d.ts.map +0 -1
- package/dist/blog/BlogList.d.ts.map +0 -1
- package/dist/blog/BlogPost.d.ts.map +0 -1
- package/dist/blog/BlogPostFaqSection.d.ts +0 -3
- package/dist/blog/BlogPostFaqSection.d.ts.map +0 -1
- package/dist/blog/BlogSidebar.d.ts.map +0 -1
- package/dist/blog/BlogViewTracker.d.ts.map +0 -1
- package/dist/blog/ClusterLandingPage.d.ts.map +0 -1
- package/dist/blog/ClusterNavigation.d.ts.map +0 -1
- package/dist/blog/ManagedNewsletterForm.d.ts.map +0 -1
- package/dist/blog/NewsletterShell.d.ts.map +0 -1
- package/dist/blog/NewsletterWidget.d.ts.map +0 -1
- package/dist/blog/RelatedPosts.d.ts.map +0 -1
- package/dist/blog/ServiceCallout.d.ts.map +0 -1
- package/dist/blog/TableOfContents.d.ts.map +0 -1
- package/dist/blog/artwork.d.ts +0 -14
- package/dist/blog/artwork.d.ts.map +0 -1
- package/dist/blog/author-schema.d.ts.map +0 -1
- package/dist/blog/author-social.d.ts.map +0 -1
- package/dist/blog/blog-styles.d.ts.map +0 -1
- package/dist/blog/blog-tables.d.ts.map +0 -1
- package/dist/blog/excerpt.d.ts.map +0 -1
- package/dist/blog/index.d.ts.map +0 -1
- package/dist/blog/index.js.map +0 -1
- package/dist/blog/index.mjs.map +0 -1
- package/dist/blog/processBlogHtml.d.ts.map +0 -1
- package/dist/blog/public-reads.d.ts +0 -27
- package/dist/blog/public-reads.d.ts.map +0 -1
- package/dist/blog/reading-time.d.ts.map +0 -1
- package/dist/blog/routes.d.ts.map +0 -1
- package/dist/blog/server-core.d.ts.map +0 -1
- package/dist/blog/server-ui.d.ts +0 -29
- package/dist/blog/server-ui.d.ts.map +0 -1
- package/dist/blog/server-ui.js +0 -267
- package/dist/blog/server-ui.js.map +0 -1
- package/dist/blog/server-ui.mjs +0 -203
- package/dist/blog/server-ui.mjs.map +0 -1
- package/dist/blog/server.d.ts.map +0 -1
- package/dist/blog/server.js +0 -207
- package/dist/blog/server.mjs +0 -10
- package/dist/blog/types.d.ts.map +0 -1
- package/dist/blog/widget-styles.d.ts +0 -9
- package/dist/blog/widget-styles.d.ts.map +0 -1
- package/dist/blog-styles-6EY3BS5Y.js.map +0 -1
- package/dist/blog-styles-7AKRUMV7.mjs.map +0 -1
- package/dist/blog-tables-DWDEWA3S.js +0 -17
- package/dist/blog-tables-DWDEWA3S.js.map +0 -1
- package/dist/blog-tables-QGIHOESZ.mjs +0 -4
- package/dist/blog-tables-QGIHOESZ.mjs.map +0 -1
- package/dist/chunk-3EY5E35M.mjs.map +0 -1
- package/dist/chunk-4LYW6PMU.mjs.map +0 -1
- package/dist/chunk-4TLFZ6NR.mjs.map +0 -1
- package/dist/chunk-5B4J3IBX.mjs +0 -164
- package/dist/chunk-5B4J3IBX.mjs.map +0 -1
- package/dist/chunk-75A4KY4X.mjs.map +0 -1
- package/dist/chunk-7TC3GRXQ.js.map +0 -1
- package/dist/chunk-AK6JZ3OE.mjs.map +0 -1
- package/dist/chunk-FHPW7XVH.js +0 -175
- package/dist/chunk-FHPW7XVH.js.map +0 -1
- package/dist/chunk-G2WC3CXW.js.map +0 -1
- package/dist/chunk-GHECYDSZ.mjs.map +0 -1
- package/dist/chunk-GQF6QAQS.js.map +0 -1
- package/dist/chunk-H5NBFNND.js.map +0 -1
- package/dist/chunk-HX6ZG3PP.js.map +0 -1
- package/dist/chunk-JLVCWC6A.mjs.map +0 -1
- package/dist/chunk-K4TCEAUX.js.map +0 -1
- package/dist/chunk-KPWK23G7.js.map +0 -1
- package/dist/chunk-LMEUYRRR.js.map +0 -1
- package/dist/chunk-O237KKCX.mjs.map +0 -1
- package/dist/chunk-Q2NBD54V.js.map +0 -1
- package/dist/chunk-R7GHP3FY.js.map +0 -1
- package/dist/chunk-RA4DCRMR.mjs.map +0 -1
- package/dist/chunk-TAPCWMBV.mjs +0 -6
- package/dist/chunk-TJVZEDE3.js +0 -8
- package/dist/chunk-Y5QZPUL3.mjs.map +0 -1
- package/dist/chunk-YFX3Q56O.mjs.map +0 -1
- package/dist/chunk-YN7QHLWF.js.map +0 -1
- package/dist/chunk-YQTE32QK.js.map +0 -1
- package/dist/chunk-ZPLN537Q.mjs.map +0 -1
- package/dist/chunk-ZVI7MBVF.mjs.map +0 -1
- package/dist/discover-CYXYKHZ2.mjs +0 -4
- package/dist/discover-NGEPXZOD.js +0 -21
- package/dist/writeLLMsTxt-CQ7A4AAL.js +0 -19
- package/dist/writeLLMsTxt-NX5MSPYX.mjs +0 -10
- /package/dist/{blog → articles}/server.js.map +0 -0
- /package/dist/{blog → articles}/server.mjs.map +0 -0
|
@@ -1,9 +1,62 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { resolveArticleArtwork } from './chunk-ZL35JCDA.mjs';
|
|
2
|
+
import { resolveArticleUrl, createPublicationRoutes, resolvePublicationUrl, articleCategorySlug } from './chunk-6DCAMW62.mjs';
|
|
3
|
+
import { withSiteParam, withSiteBody } from './chunk-AS2HUIDW.mjs';
|
|
3
4
|
import { resolveServerApiConfig } from './chunk-6XNEGG5B.mjs';
|
|
4
5
|
import { notFound } from 'next/navigation';
|
|
5
6
|
|
|
6
|
-
// src/
|
|
7
|
+
// src/articles/public-reads.ts
|
|
8
|
+
async function fetchArticleBySlug({ apiUrl, apiKey, site }, slug) {
|
|
9
|
+
try {
|
|
10
|
+
const response = await fetch(withSiteParam(`${apiUrl}/public/articles/posts/${slug}`, site), {
|
|
11
|
+
headers: { "x-api-key": apiKey },
|
|
12
|
+
next: { revalidate: 60 }
|
|
13
|
+
});
|
|
14
|
+
if (!response.ok) {
|
|
15
|
+
if (response.status !== 404) console.error("[Articles] Failed to fetch post:", response.statusText);
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
const data = await response.json();
|
|
19
|
+
return data.post || null;
|
|
20
|
+
} catch (error) {
|
|
21
|
+
console.error("[Articles] Error fetching post:", error);
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
async function fetchArticleCategories({ apiUrl, apiKey, site }) {
|
|
26
|
+
try {
|
|
27
|
+
const response = await fetch(withSiteParam(`${apiUrl}/public/articles/categories`, site), {
|
|
28
|
+
headers: { "x-api-key": apiKey },
|
|
29
|
+
next: { revalidate: 300 }
|
|
30
|
+
});
|
|
31
|
+
if (!response.ok) return [];
|
|
32
|
+
const data = await response.json();
|
|
33
|
+
return data.categories || [];
|
|
34
|
+
} catch (error) {
|
|
35
|
+
console.error("[Articles] Error fetching categories:", error);
|
|
36
|
+
return [];
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
async function fetchRelatedArticles({ apiUrl, apiKey, site }, currentPostId, limit, cache = {}) {
|
|
40
|
+
try {
|
|
41
|
+
const response = await fetch(`${apiUrl}/public/articles/related`, {
|
|
42
|
+
method: "POST",
|
|
43
|
+
headers: { "Content-Type": "application/json", "x-api-key": apiKey },
|
|
44
|
+
body: JSON.stringify(withSiteBody({ current_post_id: currentPostId, limit }, site)),
|
|
45
|
+
...cache.revalidate !== void 0 ? { next: { revalidate: cache.revalidate } } : {}
|
|
46
|
+
});
|
|
47
|
+
if (!response.ok) {
|
|
48
|
+
console.error("[Articles] Failed to fetch related posts:", response.statusText);
|
|
49
|
+
return [];
|
|
50
|
+
}
|
|
51
|
+
const data = await response.json();
|
|
52
|
+
return data.posts || [];
|
|
53
|
+
} catch (error) {
|
|
54
|
+
console.error("[Articles] Error fetching related posts:", error);
|
|
55
|
+
return [];
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// src/articles/excerpt.ts
|
|
7
60
|
function sanitizeExcerpt(raw, maxLength = 160) {
|
|
8
61
|
if (!raw) return "";
|
|
9
62
|
let text = String(raw).trim();
|
|
@@ -35,7 +88,45 @@ function sanitizeExcerpt(raw, maxLength = 160) {
|
|
|
35
88
|
return `${(lastSpace > maxLength * 0.6 ? cut.slice(0, lastSpace) : cut).replace(/[\s,;:—–-]+$/, "")}\u2026`;
|
|
36
89
|
}
|
|
37
90
|
|
|
38
|
-
// src/
|
|
91
|
+
// src/articles/news-sitemap.ts
|
|
92
|
+
var NEWS_SITEMAP_WINDOW_MS = 2 * 24 * 60 * 60 * 1e3;
|
|
93
|
+
var NEWS_SITEMAP_MAX_URLS = 1e3;
|
|
94
|
+
var FEED_DEFAULT_ITEMS = 20;
|
|
95
|
+
function escapeXml(text) {
|
|
96
|
+
return text.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
97
|
+
}
|
|
98
|
+
function cdata(html) {
|
|
99
|
+
return `<![CDATA[${html.replace(/]]>/g, "]]]]><![CDATA[>")}]]>`;
|
|
100
|
+
}
|
|
101
|
+
function recentNewsPosts(posts, now = /* @__PURE__ */ new Date()) {
|
|
102
|
+
const cutoff = now.getTime() - NEWS_SITEMAP_WINDOW_MS;
|
|
103
|
+
return posts.filter((post) => {
|
|
104
|
+
const published = post.published_at ? Date.parse(post.published_at) : NaN;
|
|
105
|
+
return Number.isFinite(published) && published >= cutoff && published <= now.getTime();
|
|
106
|
+
}).sort((a, b) => Date.parse(b.published_at) - Date.parse(a.published_at)).slice(0, NEWS_SITEMAP_MAX_URLS);
|
|
107
|
+
}
|
|
108
|
+
function buildNewsSitemapXml(posts, options, now = /* @__PURE__ */ new Date()) {
|
|
109
|
+
const language = options.language || "en";
|
|
110
|
+
const items = recentNewsPosts(posts, now).map((post) => {
|
|
111
|
+
const url = resolveArticleUrl(post, { ...options, siteUrl: options.siteUrl });
|
|
112
|
+
return ` <url>
|
|
113
|
+
<loc>${escapeXml(url)}</loc>
|
|
114
|
+
<news:news>
|
|
115
|
+
<news:publication>
|
|
116
|
+
<news:name>${escapeXml(options.publicationName)}</news:name>
|
|
117
|
+
<news:language>${escapeXml(language)}</news:language>
|
|
118
|
+
</news:publication>
|
|
119
|
+
<news:publication_date>${new Date(post.published_at).toISOString()}</news:publication_date>
|
|
120
|
+
<news:title>${escapeXml(post.title)}</news:title>
|
|
121
|
+
</news:news>
|
|
122
|
+
</url>`;
|
|
123
|
+
});
|
|
124
|
+
return `<?xml version="1.0" encoding="UTF-8"?>
|
|
125
|
+
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9">
|
|
126
|
+
${items.join("\n")}${items.length ? "\n" : ""}</urlset>`;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// src/articles/server-core.ts
|
|
39
130
|
var SEO_LIMITS = {
|
|
40
131
|
title: { min: 30, max: 60, recommended: 55 },
|
|
41
132
|
metaDescription: { min: 120, max: 160, recommended: 155 },
|
|
@@ -79,7 +170,7 @@ function validateMetaDescription(description, focusKeyphrase) {
|
|
|
79
170
|
}
|
|
80
171
|
return { field: "meta_description", value: description, length, limit: SEO_LIMITS.metaDescription, status, message };
|
|
81
172
|
}
|
|
82
|
-
function
|
|
173
|
+
function validateArticleSeo(post) {
|
|
83
174
|
const results = [];
|
|
84
175
|
const focusKeyphrase = post.focus_keyphrase;
|
|
85
176
|
if (post.meta_title || post.title) {
|
|
@@ -125,28 +216,28 @@ function validateBlogPostSeo(post) {
|
|
|
125
216
|
}
|
|
126
217
|
return results;
|
|
127
218
|
}
|
|
128
|
-
async function
|
|
219
|
+
async function getArticle(slug, options) {
|
|
129
220
|
const config = resolveServerApiConfig();
|
|
130
221
|
if (!config) {
|
|
131
|
-
console.warn("[
|
|
222
|
+
console.warn("[Articles] No API key configured");
|
|
132
223
|
return null;
|
|
133
224
|
}
|
|
134
|
-
return
|
|
225
|
+
return fetchArticleBySlug({ ...config, site: options?.site }, slug);
|
|
135
226
|
}
|
|
136
|
-
async function
|
|
137
|
-
const post = await
|
|
227
|
+
async function requireArticle(slug, options) {
|
|
228
|
+
const post = await getArticle(slug, options);
|
|
138
229
|
if (!post) notFound();
|
|
139
230
|
return post;
|
|
140
231
|
}
|
|
141
|
-
async function
|
|
232
|
+
async function getAllArticleSlugs() {
|
|
142
233
|
const config = resolveServerApiConfig();
|
|
143
234
|
if (!config) {
|
|
144
|
-
console.warn("[
|
|
235
|
+
console.warn("[Articles] No API key configured");
|
|
145
236
|
return [];
|
|
146
237
|
}
|
|
147
238
|
const { apiUrl, apiKey } = config;
|
|
148
239
|
try {
|
|
149
|
-
const response = await fetch(withSiteParam(`${apiUrl}/public/
|
|
240
|
+
const response = await fetch(withSiteParam(`${apiUrl}/public/articles/slugs`), {
|
|
150
241
|
headers: { "x-api-key": apiKey },
|
|
151
242
|
next: { revalidate: 300 }
|
|
152
243
|
});
|
|
@@ -154,30 +245,30 @@ async function getAllBlogSlugs() {
|
|
|
154
245
|
const data = await response.json();
|
|
155
246
|
return data.slugs || [];
|
|
156
247
|
} catch (error) {
|
|
157
|
-
console.error("[
|
|
248
|
+
console.error("[Articles] Error fetching slugs:", error);
|
|
158
249
|
return [];
|
|
159
250
|
}
|
|
160
251
|
}
|
|
161
|
-
async function
|
|
252
|
+
async function getArticleCategories(options) {
|
|
162
253
|
const config = resolveServerApiConfig();
|
|
163
254
|
if (!config) return [];
|
|
164
|
-
return await
|
|
255
|
+
return await fetchArticleCategories({ ...config, site: options?.site });
|
|
165
256
|
}
|
|
166
|
-
async function
|
|
167
|
-
const post = await
|
|
257
|
+
async function generateArticleMetadata(slug, options = {}) {
|
|
258
|
+
const post = await getArticle(slug);
|
|
168
259
|
const { siteName, siteUrl = "", defaultImage, twitterHandle } = options;
|
|
169
260
|
if (!post) {
|
|
170
261
|
if (options.notFound !== false) notFound();
|
|
171
262
|
return {
|
|
172
263
|
title: "Post Not Found",
|
|
173
|
-
description: "The requested
|
|
264
|
+
description: "The requested article could not be found.",
|
|
174
265
|
robots: { index: false, follow: true }
|
|
175
266
|
};
|
|
176
267
|
}
|
|
177
268
|
const title = post.meta_title || post.title;
|
|
178
269
|
const description = sanitizeExcerpt(post.meta_description || post.excerpt);
|
|
179
270
|
const image = options.images === false ? void 0 : post.featured_image || defaultImage;
|
|
180
|
-
const url =
|
|
271
|
+
const url = resolveArticleUrl(post, options);
|
|
181
272
|
return {
|
|
182
273
|
title,
|
|
183
274
|
description,
|
|
@@ -216,7 +307,7 @@ async function generateBlogPostMetadata(slug, options = {}) {
|
|
|
216
307
|
}
|
|
217
308
|
};
|
|
218
309
|
}
|
|
219
|
-
function
|
|
310
|
+
function generatePublicationMetadata(options) {
|
|
220
311
|
const {
|
|
221
312
|
title = "Blog",
|
|
222
313
|
description = "Read our latest articles and insights.",
|
|
@@ -225,14 +316,14 @@ function generateBlogIndexMetadata(options) {
|
|
|
225
316
|
defaultImage,
|
|
226
317
|
twitterHandle
|
|
227
318
|
} = options;
|
|
228
|
-
const base =
|
|
319
|
+
const base = createPublicationRoutes(options).index;
|
|
229
320
|
return {
|
|
230
321
|
title,
|
|
231
322
|
description,
|
|
232
323
|
openGraph: {
|
|
233
324
|
title,
|
|
234
325
|
description,
|
|
235
|
-
url:
|
|
326
|
+
url: resolvePublicationUrl(base, siteUrl),
|
|
236
327
|
siteName,
|
|
237
328
|
type: "website",
|
|
238
329
|
...defaultImage && { images: [{ url: defaultImage }] }
|
|
@@ -246,9 +337,9 @@ function generateBlogIndexMetadata(options) {
|
|
|
246
337
|
}
|
|
247
338
|
};
|
|
248
339
|
}
|
|
249
|
-
function
|
|
340
|
+
function generateArticleCategoryMetadata(categoryName, options = {}) {
|
|
250
341
|
const { siteName, siteUrl = "", defaultImage } = options;
|
|
251
|
-
const title = `${categoryName} -
|
|
342
|
+
const title = `${categoryName} - Articles`;
|
|
252
343
|
const description = `Browse all posts in ${categoryName}.`;
|
|
253
344
|
const slug = options.categorySlug ?? categoryName.toLowerCase().trim().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|
|
254
345
|
return {
|
|
@@ -257,7 +348,7 @@ function generateBlogCategoryMetadata(categoryName, options = {}) {
|
|
|
257
348
|
openGraph: {
|
|
258
349
|
title,
|
|
259
350
|
description,
|
|
260
|
-
url:
|
|
351
|
+
url: resolvePublicationUrl(createPublicationRoutes(options).category(slug), siteUrl),
|
|
261
352
|
siteName,
|
|
262
353
|
type: "website",
|
|
263
354
|
...defaultImage && { images: [{ url: defaultImage }] }
|
|
@@ -267,69 +358,84 @@ function generateBlogCategoryMetadata(categoryName, options = {}) {
|
|
|
267
358
|
function isNextStaticParamsProps(value) {
|
|
268
359
|
return "params" in value;
|
|
269
360
|
}
|
|
270
|
-
async function
|
|
361
|
+
async function generateArticleStaticParams(arg = {}) {
|
|
271
362
|
const options = isNextStaticParamsProps(arg) ? {} : arg;
|
|
272
|
-
const posts = await
|
|
363
|
+
const posts = await getArticleRouteEntries(options);
|
|
273
364
|
return posts.map((post) => {
|
|
274
|
-
const category =
|
|
365
|
+
const category = articleCategorySlug(post.category || options.category);
|
|
275
366
|
return { slug: post.slug, ...options.includeCategoryInPath && category ? { category } : {} };
|
|
276
367
|
});
|
|
277
368
|
}
|
|
278
369
|
async function generateCategoryStaticParams() {
|
|
279
|
-
const categories = await
|
|
370
|
+
const categories = await getArticleCategories();
|
|
280
371
|
return categories.map((c) => ({ category: c.slug }));
|
|
281
372
|
}
|
|
282
|
-
|
|
373
|
+
function absoluteImage(image, siteUrl) {
|
|
374
|
+
const value = image?.trim();
|
|
375
|
+
if (!value) return null;
|
|
376
|
+
try {
|
|
377
|
+
return new URL(value, siteUrl.endsWith("/") ? siteUrl : `${siteUrl}/`).toString();
|
|
378
|
+
} catch {
|
|
379
|
+
return null;
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
async function getArticleRouteEntries(options, withCanonicals = false) {
|
|
283
383
|
if (withCanonicals || options.includeCategoryInPath || options.postPath) {
|
|
284
|
-
return (await
|
|
384
|
+
return (await getAllArticles({ maxPosts: Infinity })).map((post) => ({ ...post, last_modified: post.updated_at }));
|
|
285
385
|
}
|
|
286
|
-
return
|
|
386
|
+
return getAllArticleSlugs();
|
|
287
387
|
}
|
|
288
|
-
async function
|
|
289
|
-
const slugs = await
|
|
290
|
-
const categories = options.includeCategories === false ? [] : await
|
|
388
|
+
async function generateArticleSitemap(siteUrl, options = {}) {
|
|
389
|
+
const slugs = await getArticleRouteEntries(options, true);
|
|
390
|
+
const categories = options.includeCategories === false ? [] : await getArticleCategories();
|
|
291
391
|
const clusters = options.includeClusters === false ? [] : await getTopicClusters();
|
|
292
392
|
const entries = [
|
|
293
|
-
//
|
|
393
|
+
// Publication index
|
|
294
394
|
{
|
|
295
|
-
url:
|
|
395
|
+
url: resolvePublicationUrl(createPublicationRoutes(options).index, siteUrl),
|
|
296
396
|
changeFrequency: "daily",
|
|
297
397
|
priority: 0.8
|
|
298
398
|
}
|
|
299
399
|
];
|
|
300
400
|
clusters.forEach((cluster) => {
|
|
301
401
|
entries.push({
|
|
302
|
-
url:
|
|
402
|
+
url: resolvePublicationUrl(createPublicationRoutes(options).cluster(cluster.cluster_slug), siteUrl),
|
|
303
403
|
changeFrequency: "weekly",
|
|
304
404
|
priority: 0.8
|
|
305
405
|
});
|
|
306
406
|
});
|
|
307
407
|
categories.forEach((cat) => {
|
|
308
408
|
entries.push({
|
|
309
|
-
url:
|
|
409
|
+
url: resolvePublicationUrl(createPublicationRoutes(options).category(cat.slug), siteUrl),
|
|
310
410
|
changeFrequency: "weekly",
|
|
311
411
|
priority: 0.6
|
|
312
412
|
});
|
|
313
413
|
});
|
|
314
414
|
slugs.forEach((post) => {
|
|
315
415
|
const isPillar = post.article_type === "pillar";
|
|
416
|
+
const image = absoluteImage(post.featured_image, siteUrl);
|
|
316
417
|
entries.push({
|
|
317
|
-
url:
|
|
418
|
+
url: resolveArticleUrl(post, { ...options, siteUrl }),
|
|
318
419
|
lastModified: post.last_modified ? new Date(post.last_modified) : void 0,
|
|
319
420
|
changeFrequency: isPillar ? "weekly" : "monthly",
|
|
320
|
-
priority: isPillar ? 0.9 : 0.7
|
|
421
|
+
priority: isPillar ? 0.9 : 0.7,
|
|
422
|
+
...image ? { images: [image] } : {}
|
|
321
423
|
});
|
|
322
424
|
});
|
|
323
425
|
return entries;
|
|
324
426
|
}
|
|
325
|
-
function
|
|
427
|
+
async function generateNewsSitemap(options) {
|
|
428
|
+
const posts = await getAllArticles({ maxPosts: 50, site: options.site });
|
|
429
|
+
return buildNewsSitemapXml(posts, options);
|
|
430
|
+
}
|
|
431
|
+
function generateArticleSchema(post, options = {}) {
|
|
326
432
|
const { siteUrl = "", siteName, logoUrl } = options;
|
|
327
433
|
const schema = {
|
|
328
434
|
"@context": "https://schema.org",
|
|
329
435
|
"@type": "BlogPosting",
|
|
330
436
|
headline: post.title,
|
|
331
437
|
description: sanitizeExcerpt(post.excerpt || post.meta_description),
|
|
332
|
-
url:
|
|
438
|
+
url: resolveArticleUrl(post, { ...options, siteUrl }),
|
|
333
439
|
datePublished: post.published_at,
|
|
334
440
|
dateModified: post.updated_at,
|
|
335
441
|
author: {
|
|
@@ -337,7 +443,7 @@ function generateBlogPostSchema(post, options = {}) {
|
|
|
337
443
|
name: typeof post.author === "string" ? post.author : post.author?.name
|
|
338
444
|
}
|
|
339
445
|
};
|
|
340
|
-
const articleImage =
|
|
446
|
+
const articleImage = resolveArticleArtwork(post, "article").src;
|
|
341
447
|
if (articleImage) schema.image = articleImage;
|
|
342
448
|
if (siteName || logoUrl) {
|
|
343
449
|
schema.publisher = {
|
|
@@ -364,14 +470,14 @@ function generateBlogPostSchema(post, options = {}) {
|
|
|
364
470
|
}
|
|
365
471
|
return schema;
|
|
366
472
|
}
|
|
367
|
-
function
|
|
473
|
+
function generateArticleListSchema(options = {}) {
|
|
368
474
|
const { siteUrl = "", siteName, description } = options;
|
|
369
475
|
return {
|
|
370
476
|
"@context": "https://schema.org",
|
|
371
477
|
"@type": "Blog",
|
|
372
478
|
name: siteName ? `${siteName} Blog` : "Blog",
|
|
373
479
|
description: description || "Our latest articles and insights.",
|
|
374
|
-
url:
|
|
480
|
+
url: resolvePublicationUrl(createPublicationRoutes(options).index, siteUrl)
|
|
375
481
|
};
|
|
376
482
|
}
|
|
377
483
|
function generateFaqSchema(faqItems) {
|
|
@@ -396,7 +502,7 @@ function generateHowToSchema(post, steps, options = {}) {
|
|
|
396
502
|
"@type": "HowTo",
|
|
397
503
|
name: post.title,
|
|
398
504
|
description: sanitizeExcerpt(post.excerpt || post.meta_description),
|
|
399
|
-
image:
|
|
505
|
+
image: resolveArticleArtwork(post, "article").src,
|
|
400
506
|
totalTime: post.reading_time ? `PT${post.reading_time}M` : void 0,
|
|
401
507
|
step: steps.map((step, index) => ({
|
|
402
508
|
"@type": "HowToStep",
|
|
@@ -404,17 +510,17 @@ function generateHowToSchema(post, steps, options = {}) {
|
|
|
404
510
|
name: step.name,
|
|
405
511
|
text: step.text,
|
|
406
512
|
image: step.image,
|
|
407
|
-
url: step.url || `${
|
|
513
|
+
url: step.url || `${resolveArticleUrl(post, { ...options, siteUrl }).split("#")[0]}#step-${index + 1}`
|
|
408
514
|
}))
|
|
409
515
|
};
|
|
410
516
|
}
|
|
411
517
|
var FEED_MAX_POSTS = 100;
|
|
412
|
-
async function
|
|
518
|
+
async function getAllArticles(options = {}) {
|
|
413
519
|
const maxPosts = options.maxPosts ?? FEED_MAX_POSTS;
|
|
414
520
|
if (!(maxPosts > 0)) return [];
|
|
415
521
|
const config = resolveServerApiConfig();
|
|
416
522
|
if (!config) {
|
|
417
|
-
console.warn("[
|
|
523
|
+
console.warn("[Articles] No API key configured");
|
|
418
524
|
return [];
|
|
419
525
|
}
|
|
420
526
|
const { apiUrl, apiKey } = config;
|
|
@@ -423,7 +529,7 @@ async function getAllBlogPosts(options = {}) {
|
|
|
423
529
|
try {
|
|
424
530
|
while (posts.length < maxPosts) {
|
|
425
531
|
const response = await fetch(
|
|
426
|
-
withSiteParam(`${apiUrl}/public/
|
|
532
|
+
withSiteParam(`${apiUrl}/public/articles/posts?per_page=50&page=${page}`, options.site),
|
|
427
533
|
{
|
|
428
534
|
headers: { "x-api-key": apiKey },
|
|
429
535
|
next: { revalidate: 300 }
|
|
@@ -437,13 +543,10 @@ async function getAllBlogPosts(options = {}) {
|
|
|
437
543
|
page += 1;
|
|
438
544
|
}
|
|
439
545
|
} catch (error) {
|
|
440
|
-
console.error("[
|
|
546
|
+
console.error("[Articles] Error fetching posts for RSS:", error);
|
|
441
547
|
}
|
|
442
548
|
return posts.slice(0, maxPosts);
|
|
443
549
|
}
|
|
444
|
-
function escapeXml(text) {
|
|
445
|
-
return text.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
446
|
-
}
|
|
447
550
|
function stripHtml(html) {
|
|
448
551
|
return html.replace(/<[^>]*>/g, "").trim();
|
|
449
552
|
}
|
|
@@ -451,7 +554,7 @@ async function generateRssFeed(options) {
|
|
|
451
554
|
const {
|
|
452
555
|
siteUrl,
|
|
453
556
|
siteName,
|
|
454
|
-
description = "Latest
|
|
557
|
+
description = "Latest articles and insights",
|
|
455
558
|
language = "en-us",
|
|
456
559
|
copyright,
|
|
457
560
|
managingEditor,
|
|
@@ -459,7 +562,7 @@ async function generateRssFeed(options) {
|
|
|
459
562
|
ttl = 60,
|
|
460
563
|
imageUrl
|
|
461
564
|
} = options;
|
|
462
|
-
const posts = await
|
|
565
|
+
const posts = await getAllArticles({ maxPosts: options.maxItems ?? FEED_DEFAULT_ITEMS });
|
|
463
566
|
const now = (/* @__PURE__ */ new Date()).toUTCString();
|
|
464
567
|
let rss = `<?xml version="1.0" encoding="UTF-8"?>
|
|
465
568
|
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
|
|
@@ -471,7 +574,7 @@ async function generateRssFeed(options) {
|
|
|
471
574
|
<lastBuildDate>${now}</lastBuildDate>
|
|
472
575
|
<pubDate>${now}</pubDate>
|
|
473
576
|
<ttl>${ttl}</ttl>
|
|
474
|
-
<atom:link href="${escapeXml(
|
|
577
|
+
<atom:link href="${escapeXml(resolvePublicationUrl(createPublicationRoutes(options).rss, siteUrl))}" rel="self" type="application/rss+xml"/>
|
|
475
578
|
`;
|
|
476
579
|
if (copyright) {
|
|
477
580
|
rss += ` <copyright>${escapeXml(copyright)}</copyright>
|
|
@@ -494,7 +597,7 @@ async function generateRssFeed(options) {
|
|
|
494
597
|
`;
|
|
495
598
|
}
|
|
496
599
|
for (const post of posts) {
|
|
497
|
-
const postUrl =
|
|
600
|
+
const postUrl = resolveArticleUrl(post, { ...options, siteUrl });
|
|
498
601
|
const pubDate = post.published_at ? new Date(post.published_at).toUTCString() : now;
|
|
499
602
|
const author = typeof post.author === "string" ? post.author : post.author?.name || "Unknown";
|
|
500
603
|
const fullContent = post.content_html || post.content || "";
|
|
@@ -504,7 +607,7 @@ async function generateRssFeed(options) {
|
|
|
504
607
|
<link>${escapeXml(postUrl)}</link>
|
|
505
608
|
<guid isPermaLink="true">${escapeXml(postUrl)}</guid>
|
|
506
609
|
<description>${escapeXml(description2)}</description>
|
|
507
|
-
<content:encoded
|
|
610
|
+
<content:encoded>${cdata(fullContent)}</content:encoded>
|
|
508
611
|
<pubDate>${pubDate}</pubDate>
|
|
509
612
|
<author>${escapeXml(author)}</author>
|
|
510
613
|
`;
|
|
@@ -535,18 +638,18 @@ async function generateAtomFeed(options) {
|
|
|
535
638
|
const {
|
|
536
639
|
siteUrl,
|
|
537
640
|
siteName,
|
|
538
|
-
description = "Latest
|
|
641
|
+
description = "Latest articles and insights",
|
|
539
642
|
managingEditor
|
|
540
643
|
} = options;
|
|
541
|
-
const posts = await
|
|
644
|
+
const posts = await getAllArticles({ maxPosts: options.maxItems ?? FEED_DEFAULT_ITEMS });
|
|
542
645
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
543
646
|
let atom = `<?xml version="1.0" encoding="UTF-8"?>
|
|
544
647
|
<feed xmlns="http://www.w3.org/2005/Atom">
|
|
545
648
|
<title>${escapeXml(siteName)}</title>
|
|
546
649
|
<subtitle>${escapeXml(description)}</subtitle>
|
|
547
|
-
<link href="${escapeXml(
|
|
650
|
+
<link href="${escapeXml(resolvePublicationUrl(createPublicationRoutes(options).atom, siteUrl))}" rel="self"/>
|
|
548
651
|
<link href="${siteUrl}"/>
|
|
549
|
-
<id>${escapeXml(
|
|
652
|
+
<id>${escapeXml(resolvePublicationUrl(createPublicationRoutes(options).index, siteUrl))}</id>
|
|
550
653
|
<updated>${now}</updated>
|
|
551
654
|
`;
|
|
552
655
|
if (managingEditor) {
|
|
@@ -556,7 +659,7 @@ async function generateAtomFeed(options) {
|
|
|
556
659
|
`;
|
|
557
660
|
}
|
|
558
661
|
for (const post of posts) {
|
|
559
|
-
const postUrl =
|
|
662
|
+
const postUrl = resolveArticleUrl(post, { ...options, siteUrl });
|
|
560
663
|
const updated = post.updated_at || post.published_at || now;
|
|
561
664
|
const published = post.published_at || now;
|
|
562
665
|
const author = typeof post.author === "string" ? post.author : post.author?.name || "Unknown";
|
|
@@ -571,7 +674,7 @@ async function generateAtomFeed(options) {
|
|
|
571
674
|
<name>${escapeXml(author)}</name>
|
|
572
675
|
</author>
|
|
573
676
|
<summary>${escapeXml(sanitizeExcerpt(post.excerpt, 300) || stripHtml(fullContent).substring(0, 300))}</summary>
|
|
574
|
-
<content type="html"
|
|
677
|
+
<content type="html">${cdata(fullContent)}</content>
|
|
575
678
|
</entry>
|
|
576
679
|
`;
|
|
577
680
|
}
|
|
@@ -583,7 +686,7 @@ async function getTopicClusters(options) {
|
|
|
583
686
|
if (!config) return [];
|
|
584
687
|
const { apiUrl, apiKey } = config;
|
|
585
688
|
try {
|
|
586
|
-
const response = await fetch(withSiteParam(`${apiUrl}/public/
|
|
689
|
+
const response = await fetch(withSiteParam(`${apiUrl}/public/articles/clusters`, options?.site), {
|
|
587
690
|
headers: { "x-api-key": apiKey },
|
|
588
691
|
next: { revalidate: 300 }
|
|
589
692
|
});
|
|
@@ -607,7 +710,7 @@ async function getTopicClusters(options) {
|
|
|
607
710
|
interlink_map: []
|
|
608
711
|
}));
|
|
609
712
|
} catch (error) {
|
|
610
|
-
console.error("[
|
|
713
|
+
console.error("[Articles] Error fetching topic clusters:", error);
|
|
611
714
|
return [];
|
|
612
715
|
}
|
|
613
716
|
}
|
|
@@ -616,7 +719,7 @@ async function getTopicCluster(slug, options) {
|
|
|
616
719
|
if (!config) return null;
|
|
617
720
|
const { apiUrl, apiKey } = config;
|
|
618
721
|
try {
|
|
619
|
-
const response = await fetch(withSiteParam(`${apiUrl}/public/
|
|
722
|
+
const response = await fetch(withSiteParam(`${apiUrl}/public/articles/clusters/${slug}`, options?.site), {
|
|
620
723
|
headers: { "x-api-key": apiKey },
|
|
621
724
|
next: { revalidate: 300 }
|
|
622
725
|
});
|
|
@@ -642,7 +745,7 @@ async function getTopicCluster(slug, options) {
|
|
|
642
745
|
interlink_map: data.interlink_map || []
|
|
643
746
|
};
|
|
644
747
|
} catch (error) {
|
|
645
|
-
console.error("[
|
|
748
|
+
console.error("[Articles] Error fetching topic cluster:", error);
|
|
646
749
|
return null;
|
|
647
750
|
}
|
|
648
751
|
}
|
|
@@ -663,7 +766,7 @@ function getClusterNavigation(post) {
|
|
|
663
766
|
}
|
|
664
767
|
async function identifyTopicClusters(categorySlug) {
|
|
665
768
|
console.warn(
|
|
666
|
-
"[
|
|
769
|
+
"[Articles] identifyTopicClusters() is deprecated. Use getTopicCluster(slug) for real cluster data managed in the Sonor dashboard."
|
|
667
770
|
);
|
|
668
771
|
const posts = await getPostsByCategory(categorySlug);
|
|
669
772
|
if (posts.length < 3) return null;
|
|
@@ -682,7 +785,7 @@ async function getPostsByCategory(categorySlug, options) {
|
|
|
682
785
|
if (!config) return [];
|
|
683
786
|
const { apiUrl, apiKey } = config;
|
|
684
787
|
try {
|
|
685
|
-
const response = await fetch(withSiteParam(`${apiUrl}/public/
|
|
788
|
+
const response = await fetch(withSiteParam(`${apiUrl}/public/articles/posts?category=${encodeURIComponent(categorySlug)}&per_page=50`, options?.site), {
|
|
686
789
|
headers: { "x-api-key": apiKey },
|
|
687
790
|
next: { revalidate: 300 }
|
|
688
791
|
});
|
|
@@ -690,7 +793,7 @@ async function getPostsByCategory(categorySlug, options) {
|
|
|
690
793
|
const data = await response.json();
|
|
691
794
|
return data.posts || [];
|
|
692
795
|
} catch (error) {
|
|
693
|
-
console.error("[
|
|
796
|
+
console.error("[Articles] Error fetching category posts:", error);
|
|
694
797
|
return [];
|
|
695
798
|
}
|
|
696
799
|
}
|
|
@@ -706,7 +809,7 @@ function generateClusterItemListSchema(cluster, options = {}) {
|
|
|
706
809
|
"@type": "ListItem",
|
|
707
810
|
position: i + 1,
|
|
708
811
|
name: post.title,
|
|
709
|
-
url:
|
|
812
|
+
url: resolveArticleUrl(post, { ...options, siteUrl })
|
|
710
813
|
}))
|
|
711
814
|
};
|
|
712
815
|
}
|
|
@@ -718,7 +821,7 @@ function generateClusterArticleSchema(post, cluster, options = {}) {
|
|
|
718
821
|
"@type": "Article",
|
|
719
822
|
headline: post.title,
|
|
720
823
|
description: sanitizeExcerpt(post.excerpt || post.meta_description),
|
|
721
|
-
url:
|
|
824
|
+
url: resolveArticleUrl(post, { ...options, siteUrl }),
|
|
722
825
|
datePublished: post.published_at,
|
|
723
826
|
dateModified: post.updated_at,
|
|
724
827
|
author: {
|
|
@@ -727,7 +830,7 @@ function generateClusterArticleSchema(post, cluster, options = {}) {
|
|
|
727
830
|
},
|
|
728
831
|
keywords: post.focus_keyphrase || post.keywords
|
|
729
832
|
};
|
|
730
|
-
const articleImage =
|
|
833
|
+
const articleImage = resolveArticleArtwork(post, "article").src;
|
|
731
834
|
if (articleImage) schema.image = articleImage;
|
|
732
835
|
if (siteName || logoUrl) {
|
|
733
836
|
schema.publisher = {
|
|
@@ -740,13 +843,13 @@ function generateClusterArticleSchema(post, cluster, options = {}) {
|
|
|
740
843
|
schema.hasPart = cluster.supports.map((s) => ({
|
|
741
844
|
"@type": "Article",
|
|
742
845
|
headline: s.title,
|
|
743
|
-
url:
|
|
846
|
+
url: resolveArticleUrl(s, { ...options, siteUrl })
|
|
744
847
|
}));
|
|
745
848
|
} else if (!isPillar && cluster.pillar) {
|
|
746
849
|
schema.isPartOf = {
|
|
747
850
|
"@type": "Article",
|
|
748
851
|
headline: cluster.pillar.title,
|
|
749
|
-
url:
|
|
852
|
+
url: resolveArticleUrl(cluster.pillar, { ...options, siteUrl })
|
|
750
853
|
};
|
|
751
854
|
}
|
|
752
855
|
if (cluster.geo_target) {
|
|
@@ -761,18 +864,18 @@ function generateClusterBreadcrumbSchema(post, cluster, options = {}) {
|
|
|
761
864
|
const { siteUrl = "", siteName = "Home" } = options;
|
|
762
865
|
const items = [
|
|
763
866
|
{ "@type": "ListItem", position: 1, name: siteName, item: siteUrl },
|
|
764
|
-
{ "@type": "ListItem", position: 2, name: "Blog", item:
|
|
867
|
+
{ "@type": "ListItem", position: 2, name: "Blog", item: resolvePublicationUrl(createPublicationRoutes(options).index, siteUrl) },
|
|
765
868
|
{
|
|
766
869
|
"@type": "ListItem",
|
|
767
870
|
position: 3,
|
|
768
871
|
name: cluster.cluster_name,
|
|
769
|
-
item:
|
|
872
|
+
item: resolvePublicationUrl(createPublicationRoutes(options).cluster(cluster.cluster_slug), siteUrl)
|
|
770
873
|
},
|
|
771
874
|
{
|
|
772
875
|
"@type": "ListItem",
|
|
773
876
|
position: 4,
|
|
774
877
|
name: post.title,
|
|
775
|
-
item:
|
|
878
|
+
item: resolveArticleUrl(post, { ...options, siteUrl })
|
|
776
879
|
}
|
|
777
880
|
];
|
|
778
881
|
return {
|
|
@@ -788,19 +891,19 @@ function generateClusterLandingSchema(cluster, options = {}) {
|
|
|
788
891
|
"@type": "CollectionPage",
|
|
789
892
|
name: cluster.cluster_name,
|
|
790
893
|
description: `Comprehensive guide to ${cluster.core_topic}`,
|
|
791
|
-
url:
|
|
894
|
+
url: resolvePublicationUrl(createPublicationRoutes(options).cluster(cluster.cluster_slug), siteUrl),
|
|
792
895
|
...siteName && {
|
|
793
896
|
isPartOf: { "@type": "WebSite", name: siteName, url: siteUrl }
|
|
794
897
|
},
|
|
795
898
|
mainEntity: cluster.pillar ? {
|
|
796
899
|
"@type": "Article",
|
|
797
900
|
headline: cluster.pillar.title,
|
|
798
|
-
url:
|
|
901
|
+
url: resolveArticleUrl(cluster.pillar, { ...options, siteUrl })
|
|
799
902
|
} : void 0,
|
|
800
903
|
hasPart: cluster.supports.map((s) => ({
|
|
801
904
|
"@type": "Article",
|
|
802
905
|
headline: s.title,
|
|
803
|
-
url:
|
|
906
|
+
url: resolveArticleUrl(s, { ...options, siteUrl })
|
|
804
907
|
}))
|
|
805
908
|
};
|
|
806
909
|
}
|
|
@@ -816,7 +919,7 @@ async function generateClusterPageMetadata(clusterSlug, options = {}) {
|
|
|
816
919
|
openGraph: {
|
|
817
920
|
title,
|
|
818
921
|
description,
|
|
819
|
-
url:
|
|
922
|
+
url: resolvePublicationUrl(createPublicationRoutes(options).cluster(cluster.cluster_slug), siteUrl),
|
|
820
923
|
type: "website"
|
|
821
924
|
}
|
|
822
925
|
};
|
|
@@ -825,9 +928,9 @@ async function getRelatedInsights(currentSlug, options = {}) {
|
|
|
825
928
|
const config = resolveServerApiConfig();
|
|
826
929
|
if (!config) return [];
|
|
827
930
|
const { limit = 3, site } = options;
|
|
828
|
-
const current = await
|
|
931
|
+
const current = await getArticle(currentSlug, { site });
|
|
829
932
|
if (!current?.id) return [];
|
|
830
|
-
return
|
|
933
|
+
return fetchRelatedArticles({ ...config, site }, current.id, limit, { revalidate: 300 });
|
|
831
934
|
}
|
|
832
935
|
function generateBreadcrumbSchema(post, options = {}) {
|
|
833
936
|
const { siteUrl = "", siteName = "Home" } = options;
|
|
@@ -842,7 +945,7 @@ function generateBreadcrumbSchema(post, options = {}) {
|
|
|
842
945
|
"@type": "ListItem",
|
|
843
946
|
position: 2,
|
|
844
947
|
name: "Blog",
|
|
845
|
-
item:
|
|
948
|
+
item: resolvePublicationUrl(createPublicationRoutes(options).index, siteUrl)
|
|
846
949
|
}
|
|
847
950
|
];
|
|
848
951
|
if (post.category) {
|
|
@@ -852,20 +955,20 @@ function generateBreadcrumbSchema(post, options = {}) {
|
|
|
852
955
|
"@type": "ListItem",
|
|
853
956
|
position: 3,
|
|
854
957
|
name: categoryName,
|
|
855
|
-
item:
|
|
958
|
+
item: resolvePublicationUrl(createPublicationRoutes(options).category(categorySlug), siteUrl)
|
|
856
959
|
});
|
|
857
960
|
items.push({
|
|
858
961
|
"@type": "ListItem",
|
|
859
962
|
position: 4,
|
|
860
963
|
name: post.title,
|
|
861
|
-
item:
|
|
964
|
+
item: resolveArticleUrl(post, { ...options, siteUrl })
|
|
862
965
|
});
|
|
863
966
|
} else {
|
|
864
967
|
items.push({
|
|
865
968
|
"@type": "ListItem",
|
|
866
969
|
position: 3,
|
|
867
970
|
name: post.title,
|
|
868
|
-
item:
|
|
971
|
+
item: resolveArticleUrl(post, { ...options, siteUrl })
|
|
869
972
|
});
|
|
870
973
|
}
|
|
871
974
|
return {
|
|
@@ -874,14 +977,14 @@ function generateBreadcrumbSchema(post, options = {}) {
|
|
|
874
977
|
itemListElement: items
|
|
875
978
|
};
|
|
876
979
|
}
|
|
877
|
-
function
|
|
980
|
+
function generateAllArticleSchemas(post, options = {}) {
|
|
878
981
|
const schemas = [];
|
|
879
982
|
const eeatSchema = post.schema ?? post.schema_json;
|
|
880
983
|
if (eeatSchema) {
|
|
881
984
|
const arr = Array.isArray(eeatSchema) ? eeatSchema : [eeatSchema];
|
|
882
985
|
schemas.push(...arr);
|
|
883
986
|
} else {
|
|
884
|
-
schemas.push(
|
|
987
|
+
schemas.push(generateArticleSchema(post, options));
|
|
885
988
|
const faqItems = post.faq_items ?? post.faqItems;
|
|
886
989
|
if (faqItems && faqItems.length > 0) {
|
|
887
990
|
const faqSchema = generateFaqSchema(faqItems);
|
|
@@ -894,12 +997,12 @@ function generateAllBlogSchemas(post, options = {}) {
|
|
|
894
997
|
async function getAuthorBySlug(slug, options) {
|
|
895
998
|
const config = resolveServerApiConfig();
|
|
896
999
|
if (!config) {
|
|
897
|
-
console.warn("[
|
|
1000
|
+
console.warn("[Articles] No API key configured");
|
|
898
1001
|
return null;
|
|
899
1002
|
}
|
|
900
1003
|
const { apiUrl, apiKey } = config;
|
|
901
1004
|
try {
|
|
902
|
-
const response = await fetch(withSiteParam(`${apiUrl}/public/
|
|
1005
|
+
const response = await fetch(withSiteParam(`${apiUrl}/public/articles/authors/${slug}`, options?.site), {
|
|
903
1006
|
headers: { "x-api-key": apiKey },
|
|
904
1007
|
next: { revalidate: 60 }
|
|
905
1008
|
});
|
|
@@ -907,20 +1010,20 @@ async function getAuthorBySlug(slug, options) {
|
|
|
907
1010
|
const data = await response.json();
|
|
908
1011
|
return data.author || null;
|
|
909
1012
|
} catch (error) {
|
|
910
|
-
console.error("[
|
|
1013
|
+
console.error("[Articles] Error fetching author:", error);
|
|
911
1014
|
return null;
|
|
912
1015
|
}
|
|
913
1016
|
}
|
|
914
1017
|
async function getAuthorPosts(slug, limit = 20, offset = 0, options) {
|
|
915
1018
|
const config = resolveServerApiConfig();
|
|
916
1019
|
if (!config) {
|
|
917
|
-
console.warn("[
|
|
1020
|
+
console.warn("[Articles] No API key configured");
|
|
918
1021
|
return { author: null, posts: [], total: 0 };
|
|
919
1022
|
}
|
|
920
1023
|
const { apiUrl, apiKey } = config;
|
|
921
1024
|
try {
|
|
922
1025
|
const response = await fetch(
|
|
923
|
-
withSiteParam(`${apiUrl}/public/
|
|
1026
|
+
withSiteParam(`${apiUrl}/public/articles/authors/${slug}/posts?limit=${limit}&offset=${offset}`, options?.site),
|
|
924
1027
|
{
|
|
925
1028
|
headers: { "x-api-key": apiKey },
|
|
926
1029
|
next: { revalidate: 60 }
|
|
@@ -942,19 +1045,19 @@ async function getAuthorPosts(slug, limit = 20, offset = 0, options) {
|
|
|
942
1045
|
total: data.total || 0
|
|
943
1046
|
};
|
|
944
1047
|
} catch (error) {
|
|
945
|
-
console.error("[
|
|
1048
|
+
console.error("[Articles] Error fetching author posts:", error);
|
|
946
1049
|
return { author: null, posts: [], total: 0 };
|
|
947
1050
|
}
|
|
948
1051
|
}
|
|
949
1052
|
async function getAllAuthorSlugs() {
|
|
950
1053
|
const config = resolveServerApiConfig();
|
|
951
1054
|
if (!config) {
|
|
952
|
-
console.warn("[
|
|
1055
|
+
console.warn("[Articles] No API key configured");
|
|
953
1056
|
return [];
|
|
954
1057
|
}
|
|
955
1058
|
const { apiUrl, apiKey } = config;
|
|
956
1059
|
try {
|
|
957
|
-
const response = await fetch(withSiteParam(`${apiUrl}/public/
|
|
1060
|
+
const response = await fetch(withSiteParam(`${apiUrl}/public/articles/authors`), {
|
|
958
1061
|
headers: { "x-api-key": apiKey },
|
|
959
1062
|
next: { revalidate: 300 }
|
|
960
1063
|
});
|
|
@@ -963,7 +1066,7 @@ async function getAllAuthorSlugs() {
|
|
|
963
1066
|
const authors = data.authors || [];
|
|
964
1067
|
return authors.map((a) => ({ slug: a.slug }));
|
|
965
1068
|
} catch (error) {
|
|
966
|
-
console.error("[
|
|
1069
|
+
console.error("[Articles] Error fetching author slugs:", error);
|
|
967
1070
|
return [];
|
|
968
1071
|
}
|
|
969
1072
|
}
|
|
@@ -974,7 +1077,7 @@ function generateAuthorPageMetadata(author, options = {}) {
|
|
|
974
1077
|
const { siteUrl = "", siteName } = options;
|
|
975
1078
|
const title = `${author.name}${author.title ? ` - ${author.title}` : ""}`;
|
|
976
1079
|
const description = author.short_bio || author.bio || `Articles by ${author.name}`;
|
|
977
|
-
const url =
|
|
1080
|
+
const url = resolvePublicationUrl(createPublicationRoutes(options).author(author.slug), siteUrl);
|
|
978
1081
|
return {
|
|
979
1082
|
title,
|
|
980
1083
|
description,
|
|
@@ -998,6 +1101,6 @@ function generateAuthorPageMetadata(author, options = {}) {
|
|
|
998
1101
|
};
|
|
999
1102
|
}
|
|
1000
1103
|
|
|
1001
|
-
export { SEO_LIMITS,
|
|
1002
|
-
//# sourceMappingURL=chunk-
|
|
1003
|
-
//# sourceMappingURL=chunk-
|
|
1104
|
+
export { FEED_DEFAULT_ITEMS, NEWS_SITEMAP_MAX_URLS, NEWS_SITEMAP_WINDOW_MS, SEO_LIMITS, buildNewsSitemapXml, cdata, fetchArticleBySlug, fetchArticleCategories, fetchRelatedArticles, generateAllArticleSchemas, generateArticleCategoryMetadata, generateArticleListSchema, generateArticleMetadata, generateArticleSchema, generateArticleSitemap, generateArticleStaticParams, generateAtomFeed, generateAuthorPageMetadata, generateAuthorStaticParams, generateBreadcrumbSchema, generateCategoryStaticParams, generateClusterArticleSchema, generateClusterBreadcrumbSchema, generateClusterItemListSchema, generateClusterLandingSchema, generateClusterPageMetadata, generateFaqSchema, generateHowToSchema, generateNewsSitemap, generatePublicationMetadata, generateRssFeed, getAllArticleSlugs, getAllArticles, getAllAuthorSlugs, getArticle, getArticleCategories, getAuthorBySlug, getAuthorPosts, getClusterNavigation, getPostsByCategory, getRelatedInsights, getTopicCluster, getTopicClusters, identifyTopicClusters, recentNewsPosts, requireArticle, sanitizeExcerpt, validateArticleSeo, validateMetaDescription, validateSeoTitle };
|
|
1105
|
+
//# sourceMappingURL=chunk-X3MY4PL7.mjs.map
|
|
1106
|
+
//# sourceMappingURL=chunk-X3MY4PL7.mjs.map
|