diff --git a/src/mdx/static-images.ts b/src/mdx/static-images.ts index 975fdb13..f39a680a 100644 --- a/src/mdx/static-images.ts +++ b/src/mdx/static-images.ts @@ -1,5 +1,4 @@ import { Root } from "mdast"; -import path from "path"; import { Plugin } from "unified"; import { visit } from "unist-util-visit"; import type { VFile } from "vfile"; @@ -20,10 +19,7 @@ const rehypeStaticImages: Plugin<[], Root, Root> = node.properties ) { if (!node.properties.src.startsWith("http")) { - let url = path.resolve( - path.dirname(vfile.path), - node.properties.src, - ); + let url = new URL(node.properties.src, vfile.path).pathname; const relativePath = url.startsWith("/public/") ? url.substring("/public/".length) : url; diff --git a/zudoku.config.tsx b/zudoku.config.tsx index d933824d..1b21c4d8 100644 --- a/zudoku.config.tsx +++ b/zudoku.config.tsx @@ -3,6 +3,7 @@ import type { ZudokuConfig } from "zudoku"; import { CogIcon, CopyIcon, FileTextIcon, ListEndIcon } from "zudoku/icons"; import { devPortal, docs, policies, programming } from "./sidebar.js"; import { BundlesTable } from "./src/BundlesTable"; +import { DocusaurusDocsLicense } from "./src/DocusaurusDocsLicense"; import { EnterpriseFeature } from "./src/EnterpriseFeature"; import { GithubButton } from "./src/GithubButton"; import { HeadNavigation } from "./src/HeadNavigation"; @@ -16,6 +17,7 @@ const EmbeddedChat = lazy(() => import("./src/EmbeddedChat")); const mdxComponents = { Screenshot: (props: any) => , + DocusaurusDocsLicense, GithubButton, ZupIt: (props: any) => , CodeEditorTabIcon: () => ,