Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/syndicate-post.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ jobs:
run: |
if [ "$TARGET_DOCUMENT_ID" = "backfill-dailydev" ]; then
node scripts/backfill-dailydev-and-links.mjs
elif [ "$TARGET_DOCUMENT_ID" = "enrich-aeo-seo" ]; then
SANITY_STUDIO_DATASET=production node scripts/enrich-all-posts-aeo-seo-links.mjs
SANITY_STUDIO_DATASET=dev node scripts/enrich-all-posts-aeo-seo-links.mjs
else
node scripts/run-syndicate-post.mjs
fi
Expand Down
5 changes: 4 additions & 1 deletion apps/site/src/components/portable-text/PtLink.astro
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ type Props = MarkProps<{ href?: string; blank?: boolean }>;
const { node } = Astro.props;

// stegaClean: href is an attribute — zero-width characters break the URL.
const href = stegaClean(node.markDef.href) || "#";
const rawHref = stegaClean(node.markDef.href) || "#";
const href = rawHref.startsWith("https://codingcat.dev/")
? rawHref.replace("https://codingcat.dev", "")
: rawHref;

// Matches the Next behaviour: anything not starting with "/" is off-site.
const isExternal = !href.startsWith("/");
Expand Down
Loading
Loading