Skip to content

Commit 255e24b

Browse files
authored
Merge pull request #547 from helius-labs/feat/better-tech-article-coverage-and-fallback
feat(geo): Expand TechArticle Coverage and Improve WebPage Fallback
2 parents 74c9ff6 + 384b924 commit 255e24b

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

structured-data.js

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* - FAQPage → /faqs/* pages (when Q&A pairs are present)
1515
* - SoftwareApplication → product overview pages
1616
* - WebPage + Offers → pricing page (/billing/plans)
17-
* - WebPage → everything else
17+
* - WebPage (enriched) → everything else (with speakable + dates)
1818
*/
1919
(() => {
2020
"use strict";
@@ -350,6 +350,10 @@
350350
"/staking/",
351351
"/shred-delivery/",
352352
"/agents/",
353+
"/billing/",
354+
"/support/",
355+
"/orb/",
356+
"/airship/",
353357
];
354358

355359
const GUIDE_EXACT = ["/grpc", "/agents", "/quickstart", "/getting-data", "/data-streaming"];
@@ -546,7 +550,8 @@
546550
return schema;
547551
};
548552

549-
const buildWebPageSchema = () => {
553+
const buildWebPageSchema = (options) => {
554+
const enriched = options && options.enriched;
550555
const lang = getLanguage();
551556
const desc = getMetaDescription();
552557
const schema = {
@@ -559,6 +564,12 @@
559564
inLanguage: lang,
560565
};
561566
if (desc) schema.description = desc;
567+
if (enriched) {
568+
schema.speakable = SPEAKABLE;
569+
const dates = getPageDates();
570+
if (dates.datePublished) schema.datePublished = dates.datePublished;
571+
if (dates.dateModified) schema.dateModified = dates.dateModified;
572+
}
562573
return schema;
563574
};
564575

@@ -614,7 +625,7 @@
614625
} else if (isGuide(normalizedPath)) {
615626
injectJsonLd(buildTechArticleSchema());
616627
} else {
617-
injectJsonLd(buildWebPageSchema());
628+
injectJsonLd(buildWebPageSchema({ enriched: true }));
618629
}
619630
};
620631

0 commit comments

Comments
 (0)