Skip to content

Commit 58a993e

Browse files
authored
Merge pull request #801 from CodingCatDev/feat/enrich-all-posts-aeo-seo-links
feat(seo): catalog-wide AEO/SEO, transcript link & chapter enrichment pipeline
2 parents 130a982 + a500184 commit 58a993e

3 files changed

Lines changed: 1294 additions & 1 deletion

File tree

‎.github/workflows/syndicate-post.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ jobs:
3939
run: |
4040
if [ "$TARGET_DOCUMENT_ID" = "backfill-dailydev" ]; then
4141
node scripts/backfill-dailydev-and-links.mjs
42+
elif [ "$TARGET_DOCUMENT_ID" = "enrich-aeo-seo" ]; then
43+
SANITY_STUDIO_DATASET=production node scripts/enrich-all-posts-aeo-seo-links.mjs
44+
SANITY_STUDIO_DATASET=dev node scripts/enrich-all-posts-aeo-seo-links.mjs
4245
else
4346
node scripts/run-syndicate-post.mjs
4447
fi

‎apps/site/src/components/portable-text/PtLink.astro‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ type Props = MarkProps<{ href?: string; blank?: boolean }>;
1111
const { node } = Astro.props;
1212
1313
// stegaClean: href is an attribute — zero-width characters break the URL.
14-
const href = stegaClean(node.markDef.href) || "#";
14+
const rawHref = stegaClean(node.markDef.href) || "#";
15+
const href = rawHref.startsWith("https://codingcat.dev/")
16+
? rawHref.replace("https://codingcat.dev", "")
17+
: rawHref;
1518
1619
// Matches the Next behaviour: anything not starting with "/" is off-site.
1720
const isExternal = !href.startsWith("/");

0 commit comments

Comments
 (0)