From 9168e00167a35b14693394cc56b7ccabf225240f Mon Sep 17 00:00:00 2001 From: Brian Madison Date: Sun, 25 Jan 2026 22:43:00 -0600 Subject: [PATCH] fix(build): add iframe support to rehype base path plugin Allows iframe src attributes to be properly transformed with the base path, enabling the interactive workflow diagram to be embedded in markdown pages. --- website/src/rehype-base-paths.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/website/src/rehype-base-paths.js b/website/src/rehype-base-paths.js index b5a4c88f..c6160091 100644 --- a/website/src/rehype-base-paths.js +++ b/website/src/rehype-base-paths.js @@ -39,6 +39,18 @@ export default function rehypeBasePaths(options = {}) { } } + // Process iframe tags with src attribute + if (node.tagName === 'iframe' && node.properties?.src) { + const src = node.properties.src; + + if (typeof src === 'string' && src.startsWith('/') && !src.startsWith('//')) { + // Don't transform if already has the base path + if (normalizedBase !== '/' && !src.startsWith(normalizedBase)) { + node.properties.src = normalizedBase + src.slice(1); + } + } + } + // Process anchor tags with href attribute if (node.tagName === 'a' && node.properties?.href) { const href = node.properties.href;