From 048f3fb1cdcdb682404038f7b586edb5f96e1876 Mon Sep 17 00:00:00 2001 From: Gerard <289036782+splits-gerard@users.noreply.github.com> Date: Thu, 15 Oct 2026 21:05:32 +0000 Subject: [PATCH 1/4] fix: include docs base path in markdown links --- patches/vocs.patch | 78 ++++++++++++++++++++++++++++++++++++++++++++++ pnpm-lock.yaml | 39 ++++++++++++++++++++--- 2 files changed, 112 insertions(+), 5 deletions(-) diff --git a/patches/vocs.patch b/patches/vocs.patch index ec0a824..d673ef0 100644 --- a/patches/vocs.patch +++ b/patches/vocs.patch @@ -267,6 +267,64 @@ index 14b82a21ac7f3f1f1cd8871d7cd1d5e73775ad71..d52361310e500ae73ec5d8d0d0390750 } function getIconType(iconUrl) { if (iconUrl.endsWith('.svg')) +diff --git a/dist/react/internal/AskAi.js b/dist/react/internal/AskAi.js +index 6150cb4c5efe875f37cd00dcda791bdc93e4b0d9..2d0c0782c488b23ec10db778ddccf3665409330a 100644 +--- a/dist/react/internal/AskAi.js ++++ b/dist/react/internal/AskAi.js +@@ -14,7 +14,7 @@ import { getMarkdownAssetPath } from './markdown-url.js'; + export function AskAi(props) { + const { className } = props; + const { path } = useRouter(); +- const { mcp } = useConfig(); ++ const { mcp, basePath } = useConfig(); + const [menuOpen, setMenuOpen] = React.useState(false); + const [copied, setCopied] = React.useState(false); + const [mcpCopied, setMcpCopied] = React.useState(false); +@@ -68,8 +68,8 @@ export function AskAi(props) { + }, + ], [query]); + const markdownUrl = React.useMemo(() => { +- return getMarkdownAssetPath(path); +- }, [path]); ++ return getMarkdownAssetPath(path, basePath); ++ }, [path, basePath]); + const copyPageForAi = React.useCallback(async () => { + try { + const response = await fetch(markdownUrl); +diff --git a/dist/react/internal/CopyForAi.client.js b/dist/react/internal/CopyForAi.client.js +index 0ff98da05580f8eda3ab26daaf242c437b2a5a76..eba16f3760ceb77e9c9b2f42faac602c03723ce5 100644 +--- a/dist/react/internal/CopyForAi.client.js ++++ b/dist/react/internal/CopyForAi.client.js +@@ -5,17 +5,19 @@ import * as React from 'react'; + import { useRouter } from 'waku'; + import LucideCheck from '~icons/lucide/check'; + import LucideClipboard from '~icons/lucide/clipboard'; ++import { useConfig } from '../useConfig.js'; + import { getMarkdownAssetPath } from './markdown-url.js'; + export function CopyForAi(props) { + const { className, frontmatter } = props; + const router = useRouter(); ++ const { basePath } = useConfig(); + const [state, setState] = React.useState('idle'); + const handleCopy = React.useCallback(async () => { + if (state === 'copying') + return; + setState('copying'); + try { +- const response = await fetch(getMarkdownAssetPath(router.path)); ++ const response = await fetch(getMarkdownAssetPath(router.path, basePath)); + if (!response.ok) + throw new Error('Failed to fetch markdown'); + const markdown = await response.text(); +@@ -28,7 +30,7 @@ export function CopyForAi(props) { + setState('error'); + setTimeout(() => setState('idle'), 2000); + } +- }, [router.path, state]); ++ }, [router.path, basePath, state]); + if (frontmatter?.showAskAi === false) + return null; + return (_jsxs("button", { "aria-label": "Copy page content as markdown for AI", className: cx('vocs:flex vocs:items-center vocs:gap-2 vocs:text-[13px] vocs:text-secondary vocs:hover:text-heading vocs:cursor-pointer vocs:disabled:cursor-default vocs:transition-colors', className), "data-v-copy-for-ai": true, disabled: state === 'copying', onClick: handleCopy, type: "button", children: [state === 'copied' ? (_jsx(LucideCheck, { className: "vocs:size-4 vocs:text-accent" })) : (_jsx(LucideClipboard, { className: "vocs:size-4" })), _jsx("span", { children: "Copy page for AI" })] })); diff --git a/dist/react/internal/Outline.js b/dist/react/internal/Outline.js index 4c3f4b9d933367f73b745288ae77e8f46d547932..11399b6155758f157599ec66a0e7841f33a1320d 100644 --- a/dist/react/internal/Outline.js @@ -332,6 +390,26 @@ index 8f1ab06a803496231d033e15e1bd0c8be8365e85..db7aaab19fa829deb4211e39ad4f5501 } //# sourceMappingURL=SkipToContent.client.js.map \ No newline at end of file +diff --git a/dist/react/internal/markdown-url.d.ts b/dist/react/internal/markdown-url.d.ts +index 9be110aed4783e44dfd22b6ed6871524ad218afe..33ccbfced6c2f66c84e0b2cf26792bc592d2acd8 100644 +--- a/dist/react/internal/markdown-url.d.ts ++++ b/dist/react/internal/markdown-url.d.ts +@@ -1,2 +1,2 @@ +-export declare function getMarkdownAssetPath(path: string): string; ++export declare function getMarkdownAssetPath(path: string, basePath?: string): string; + //# sourceMappingURL=markdown-url.d.ts.map +diff --git a/dist/react/internal/markdown-url.js b/dist/react/internal/markdown-url.js +index 5397bdf40f789fc4f8fe45b3a3e4e71416b5a7f4..e31fcc7036322468eb5e967d41a995f5fabcc874 100644 +--- a/dist/react/internal/markdown-url.js ++++ b/dist/react/internal/markdown-url.js +@@ -1,5 +1,5 @@ +-export function getMarkdownAssetPath(path) { ++export function getMarkdownAssetPath(path, basePath = '/') { + const pagePath = path === '/' ? '/index' : path.replace(/\/$/, ''); +- return `/assets/md${pagePath}.md`; ++ return `${basePath.replace(/\/$/, '')}/assets/md${pagePath}.md`; + } + //# sourceMappingURL=markdown-url.js.map diff --git a/dist/waku/internal/dedupe-head.js b/dist/waku/internal/dedupe-head.js index 52b95f96fce07b5d4b8d17ae01647a1a14c5c483..7805d2f731efd5f734204da114c9f991f6dde01d 100644 --- a/dist/waku/internal/dedupe-head.js diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2acea68..efbf018 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,9 +5,7 @@ settings: excludeLinksFromLockfile: false patchedDependencies: - vocs: - hash: d50b69f8c39d0459ddffcb48a2a515a6c85bed296dbce7b8e0b3a35747b52076 - path: patches/vocs.patch + vocs: 42ffd7770dca7820ca2bf19a2c59503af07c80fc92d790921a899f6b66cc9a38 importers: @@ -21,7 +19,7 @@ importers: version: 19.2.7(react@19.2.7) vocs: specifier: 2.3.2 - version: 2.3.2(patch_hash=d50b69f8c39d0459ddffcb48a2a515a6c85bed296dbce7b8e0b3a35747b52076)(@types/react@19.2.17)(@vue/compiler-sfc@3.5.39)(react-dom@19.2.7(react@19.2.7))(react-server-dom-webpack@19.2.7(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(webpack@5.108.4(esbuild@0.28.1)))(react@19.2.7)(rollup@4.62.2)(typescript@5.9.3)(vite@8.1.3(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(tsx@4.23.13)(yaml@2.9.0))(waku@1.0.0-beta.6(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(react-dom@19.2.7(react@19.2.7))(react-server-dom-webpack@19.2.7(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(webpack@5.108.4(esbuild@0.28.1)))(react@19.2.7)(terser@5.48.0)(tsx@4.23.13)(yaml@2.9.0)) + version: 2.3.2(patch_hash=42ffd7770dca7820ca2bf19a2c59503af07c80fc92d790921a899f6b66cc9a38)(@types/react@19.2.17)(@vue/compiler-sfc@3.5.39)(react-dom@19.2.7(react@19.2.7))(react-server-dom-webpack@19.2.7(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(webpack@5.108.4(esbuild@0.28.1)))(react@19.2.7)(rollup@4.62.2)(typescript@5.9.3)(vite@8.1.3(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(tsx@4.23.13)(yaml@2.9.0))(waku@1.0.0-beta.6(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(react-dom@19.2.7(react@19.2.7))(react-server-dom-webpack@19.2.7(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(webpack@5.108.4(esbuild@0.28.1)))(react@19.2.7)(terser@5.48.0)(tsx@4.23.13)(yaml@2.9.0)) waku: specifier: ^1.0.0-beta.3 version: 1.0.0-beta.6(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(react-dom@19.2.7(react@19.2.7))(react-server-dom-webpack@19.2.7(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(webpack@5.108.4(esbuild@0.28.1)))(react@19.2.7)(terser@5.48.0)(tsx@4.23.13)(yaml@2.9.0) @@ -582,36 +580,42 @@ packages: engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] + libc: [glibc] '@rolldown/binding-linux-arm64-musl@1.1.4': resolution: {integrity: sha512-lZVym0PuHE1KZ22gmFTC15lAkrg9iTszR617oYRB/iPY1A56ywoJzVKOJBKaot5RiikCObmur6pogpse3gRcng==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] + libc: [musl] '@rolldown/binding-linux-ppc64-gnu@1.1.4': resolution: {integrity: sha512-t2DNiLJWNTbnEHyUzTumldML6ET4/g16467LZoDDJ3tSxGvguL5/NyC2lCsNKuyRycg9XeDQF5SSv+TNOhQEXg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [ppc64] os: [linux] + libc: [glibc] '@rolldown/binding-linux-s390x-gnu@1.1.4': resolution: {integrity: sha512-0WIRnL1Uw4BvTZRLQt+PVgo6ZKTJadlC2btP+/EOXv2f/DWbY0rEgl+y834mIVwP1FkTlWVTrGGJXf12lru7EQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [s390x] os: [linux] + libc: [glibc] '@rolldown/binding-linux-x64-gnu@1.1.4': resolution: {integrity: sha512-JWtGshGfX+oENAKonoNkqEJX+7hC8yfhi9GUyPX1VX4mdh1y5r+ZiJLR5XzAB0aoP6s/PcILsGjKq8O0mm24bw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] + libc: [glibc] '@rolldown/binding-linux-x64-musl@1.1.4': resolution: {integrity: sha512-rT6yQcxUuXs4CnbofqwHRRV0iem349rLMYpTjkgQGLjrY4ado/eDzwPZPTCgTOlF6Nkp8NEv70yLMTn6qkWxsQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] + libc: [musl] '@rolldown/binding-openharmony-arm64@1.1.4': resolution: {integrity: sha512-KXMGoboq5cyaCQjDA4GLuRiOwBQ0EyFnJoVViLeZ45/3rFItRODEr+NdsBcVpll40hhNArlm/speWGRvj08LzA==} @@ -682,66 +686,79 @@ packages: resolution: {integrity: sha512-n1GJHPOvpIfhi3TmrCeh6S6URt9BFCt0KQE3qvexyGCTAKpR4Lg+eWvNZEqu7epxwus/8ElT3hacYEucm49SZg==} cpu: [arm] os: [linux] + libc: [glibc] '@rollup/rollup-linux-arm-musleabihf@4.62.2': resolution: {integrity: sha512-JqgflS8wEB+UXV/vS1RpRbifGBeN4D5lz8D8oOFbFZw4vedvdOgCFAjfBmIMdW3yL10XpQQ0Ambepw6MXrhOnA==} cpu: [arm] os: [linux] + libc: [musl] '@rollup/rollup-linux-arm64-gnu@4.62.2': resolution: {integrity: sha512-wnFJkogWvN4jm/hQRF2UBaeUmk20j5+DmHvoyWii2b8HJDyvz1MF2OU/6ynXt2KR63rbZLWkFpoytpdc/yBuSA==} cpu: [arm64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-arm64-musl@4.62.2': resolution: {integrity: sha512-HVu2bp0zhvJ8xHEV9+UUs7S90VadmBSY3LcIMvozbPo4AuMGDWlz3ymHLHZPX4hR67TKTt8Qp5PJ5RBg/i+RMQ==} cpu: [arm64] os: [linux] + libc: [musl] '@rollup/rollup-linux-loong64-gnu@4.62.2': resolution: {integrity: sha512-mQqqAV8QaoSgr9I2fKDLY2BAVvmKjWoGiu/cSYQonsLvtqwEn1E4QYfnCOcp5zoEqNhsDYin1s6jx/VJmrxlZg==} cpu: [loong64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-loong64-musl@4.62.2': resolution: {integrity: sha512-IxKLoxCQ2IWi6bT2akyDUBGsOImDKB+sPp4EsTmwFQ/fMwpCKm8uLSSgP/Kx/QYUgKis6SEZ5/Nlhup0DIA0PQ==} cpu: [loong64] os: [linux] + libc: [musl] '@rollup/rollup-linux-ppc64-gnu@4.62.2': resolution: {integrity: sha512-Mk5ha2RQSgyFfmYYLkBpPnUk8D8FriBxesO1u9O75X0mHgXL1UQcH5Itl2lurWL2tj0RxV9b9tJgipac0hRY9A==} cpu: [ppc64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-ppc64-musl@4.62.2': resolution: {integrity: sha512-CjvEnqJL/0/TQ3TXX3OPIJ/kmBellrWd4heXUmHeJlTnmwjKpSJzoehLaL6Xk0ZnMHBu9dZuFADNOrtjF4v+2w==} cpu: [ppc64] os: [linux] + libc: [musl] '@rollup/rollup-linux-riscv64-gnu@4.62.2': resolution: {integrity: sha512-1SiZbzwdkaDURsew/tSOrooKiYy7EQGT6m8ufavAi9NEyQb/6VuIxFXAL1fqa4iZe3g4NbNk4P7J32z2tw5Mgg==} cpu: [riscv64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-riscv64-musl@4.62.2': resolution: {integrity: sha512-nQts12zJ3NQRoE6uYljOH89v7szzLDvG2JD/vsX+vGXU8w/At1GowTZ5/7qeFQ8m7L55rpR8Okugnuo5bgjy2Q==} cpu: [riscv64] os: [linux] + libc: [musl] '@rollup/rollup-linux-s390x-gnu@4.62.2': resolution: {integrity: sha512-E9/ll019jhPIJgpzfZoIkBGhcz+kKNgVWYRY0zr9srBdPPFVpvOKW8VaJKUbeK+eZXyQF9ltME+Kk6affeaPgg==} cpu: [s390x] os: [linux] + libc: [glibc] '@rollup/rollup-linux-x64-gnu@4.62.2': resolution: {integrity: sha512-5BqxR/pshjey51iliyzTD5Xi3EN0aLmQ2lZ3lvefVV9c82BvrLo2/6OT55iifpWBufs6kdwWbuOKS841DrmK9A==} cpu: [x64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-x64-musl@4.62.2': resolution: {integrity: sha512-uNN83XxQrRAh/w0/pmAfibcwyb6YWt4gP+dpnQKPVJshAloQ785ii8CT8ZCIxkGg9opVsvAlGhFitSm6D1Jjpg==} cpu: [x64] os: [linux] + libc: [musl] '@rollup/rollup-openbsd-x64@4.62.2': resolution: {integrity: sha512-srjEIxSH3LRnJN6THczDHWQplqEMFiAJrTab0msUryh9kwNpkICf3Ea6q6MN/2cZwRFUNx5w+h6Hpi4QuHS6Zg==} @@ -1035,24 +1052,28 @@ packages: engines: {node: '>= 20'} cpu: [arm64] os: [linux] + libc: [glibc] '@tailwindcss/oxide-linux-arm64-musl@4.3.2': resolution: {integrity: sha512-J5Nuk0uZQIiMTJj3LEx4sAA9tMFUoXQZFv1J6An+QGYe53HKRJuFDi0rpq/tuouCZeAbOBY3kQ6g8qeD4TUjtA==} engines: {node: '>= 20'} cpu: [arm64] os: [linux] + libc: [musl] '@tailwindcss/oxide-linux-x64-gnu@4.3.2': resolution: {integrity: sha512-kqCZpSKOBEJO4mz7OqWoofBZeXTAwaVGPj0ErAj7CojmhKpWVWVOnrt9dE8odoIraZq4oj3ausM37kXi+Tow8w==} engines: {node: '>= 20'} cpu: [x64] os: [linux] + libc: [glibc] '@tailwindcss/oxide-linux-x64-musl@4.3.2': resolution: {integrity: sha512-cixpqbh2toJDmkuCRI68nXA8ZxNmdK9Y+9v5h3MC3ZQKy/0BO8AWzlkWyRM7JAFSGBlfig4YVTPsK6MVgqz1uw==} engines: {node: '>= 20'} cpu: [x64] os: [linux] + libc: [musl] '@tailwindcss/oxide-wasm32-wasi@4.3.2': resolution: {integrity: sha512-4ec2Z/LOmRsAgU23CS4xeJfcJlmRg94A/XrbGRCF1gyU/zdDfRLYDVsS+ynSZCmGNxQ1jQriQOKMQeQxBA3Isw==} @@ -1104,24 +1125,28 @@ packages: engines: {node: '>= 12.22.0 < 13 || >= 14.17.0 < 15 || >= 15.12.0 < 16 || >= 16.0.0'} cpu: [arm64] os: [linux] + libc: [glibc] '@takumi-rs/core-linux-arm64-musl@0.62.8': resolution: {integrity: sha512-qR04H4DQfFsKmkl2kq/fh48zTC3QqBdvHjmHzJUckIktvJPKk1aK+jERIXeARkH6pfQuq+NI5Kbl1t9//qb8nQ==} engines: {node: '>= 12.22.0 < 13 || >= 14.17.0 < 15 || >= 15.12.0 < 16 || >= 16.0.0'} cpu: [arm64] os: [linux] + libc: [musl] '@takumi-rs/core-linux-x64-gnu@0.62.8': resolution: {integrity: sha512-/LouBAUVqK5/H3pwzOnitRz4JEJNrGJEN/L3TU0375M+uXFewWAl2iSwFqgMt9vCtKPrKa/oK+Iy3pdvFAnX2w==} engines: {node: '>= 12.22.0 < 13 || >= 14.17.0 < 15 || >= 15.12.0 < 16 || >= 16.0.0'} cpu: [x64] os: [linux] + libc: [glibc] '@takumi-rs/core-linux-x64-musl@0.62.8': resolution: {integrity: sha512-FIt0fpowyh9dse8F29cYBPVhrdc7Zzjz1pEyJunNzIzCIpC0yG3eUwFnK0wsoYoyzbgVZkbLRFRRAFmUORLvDg==} engines: {node: '>= 12.22.0 < 13 || >= 14.17.0 < 15 || >= 15.12.0 < 16 || >= 16.0.0'} cpu: [x64] os: [linux] + libc: [musl] '@takumi-rs/core-win32-arm64-msvc@0.62.8': resolution: {integrity: sha512-ucQmG2bp6yH+7oNQUev+0re+6FBHUOUcee4mwpQa+BKCtUSgkgQuw3ZAGdyXBQEfr3NrNsMqfc47b3Ljv3bIWA==} @@ -2188,24 +2213,28 @@ packages: engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] + libc: [glibc] lightningcss-linux-arm64-musl@1.32.0: resolution: {integrity: sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] + libc: [musl] lightningcss-linux-x64-gnu@1.32.0: resolution: {integrity: sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] + libc: [glibc] lightningcss-linux-x64-musl@1.32.0: resolution: {integrity: sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] + libc: [musl] lightningcss-win32-arm64-msvc@1.32.0: resolution: {integrity: sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==} @@ -7107,7 +7136,7 @@ snapshots: optionalDependencies: vite: 8.1.3(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(tsx@4.23.13)(yaml@2.9.0) - vocs@2.3.2(patch_hash=d50b69f8c39d0459ddffcb48a2a515a6c85bed296dbce7b8e0b3a35747b52076)(@types/react@19.2.17)(@vue/compiler-sfc@3.5.39)(react-dom@19.2.7(react@19.2.7))(react-server-dom-webpack@19.2.7(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(webpack@5.108.4(esbuild@0.28.1)))(react@19.2.7)(rollup@4.62.2)(typescript@5.9.3)(vite@8.1.3(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(tsx@4.23.13)(yaml@2.9.0))(waku@1.0.0-beta.6(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(react-dom@19.2.7(react@19.2.7))(react-server-dom-webpack@19.2.7(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(webpack@5.108.4(esbuild@0.28.1)))(react@19.2.7)(terser@5.48.0)(tsx@4.23.13)(yaml@2.9.0)): + vocs@2.3.2(patch_hash=42ffd7770dca7820ca2bf19a2c59503af07c80fc92d790921a899f6b66cc9a38)(@types/react@19.2.17)(@vue/compiler-sfc@3.5.39)(react-dom@19.2.7(react@19.2.7))(react-server-dom-webpack@19.2.7(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(webpack@5.108.4(esbuild@0.28.1)))(react@19.2.7)(rollup@4.62.2)(typescript@5.9.3)(vite@8.1.3(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(tsx@4.23.13)(yaml@2.9.0))(waku@1.0.0-beta.6(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(react-dom@19.2.7(react@19.2.7))(react-server-dom-webpack@19.2.7(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(webpack@5.108.4(esbuild@0.28.1)))(react@19.2.7)(terser@5.48.0)(tsx@4.23.13)(yaml@2.9.0)): dependencies: '@base-ui/react': 1.6.0(@types/react@19.2.17)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) '@codesandbox/sandpack-react': 2.20.0(react-dom@19.2.7(react@19.2.7))(react@19.2.7) From 2c7575f86b2060f9cbb4e65c886c0b5cf988ee9e Mon Sep 17 00:00:00 2001 From: Zach Herring <2172549+zherring@users.noreply.github.com> Date: Fri, 16 Oct 2026 10:18:54 -0600 Subject: [PATCH 2/4] fix: prefix AI menu page URL with base path and use pnpm 10 lockfile The Vercel build failed at install with ERR_PNPM_LOCKFILE_CONFIG_MISMATCH. The lockfile had been written by pnpm 11 (bare patch hash, extra libc fields), and Vercel installs with pnpm 10.x for this project. Regenerate it with pnpm 10 so the frozen install matches. Also patch the page URL that the AI menu copies and sends to ChatGPT and Claude. It was built from origin + path and omitted the /docs base path. Co-Authored-By: Claude Sonnet 5.5 --- patches/vocs.patch | 13 ++++++++++++- pnpm-lock.yaml | 39 +++++---------------------------------- 2 files changed, 17 insertions(+), 35 deletions(-) diff --git a/patches/vocs.patch b/patches/vocs.patch index d673ef0..e5958f1 100644 --- a/patches/vocs.patch +++ b/patches/vocs.patch @@ -268,7 +268,7 @@ index 14b82a21ac7f3f1f1cd8871d7cd1d5e73775ad71..d52361310e500ae73ec5d8d0d0390750 function getIconType(iconUrl) { if (iconUrl.endsWith('.svg')) diff --git a/dist/react/internal/AskAi.js b/dist/react/internal/AskAi.js -index 6150cb4c5efe875f37cd00dcda791bdc93e4b0d9..2d0c0782c488b23ec10db778ddccf3665409330a 100644 +index 6150cb4c5efe875f37cd00dcda791bdc93e4b0d9..89c104ffaa906485268472cc03544ef7fd8781f0 100644 --- a/dist/react/internal/AskAi.js +++ b/dist/react/internal/AskAi.js @@ -14,7 +14,7 @@ import { getMarkdownAssetPath } from './markdown-url.js'; @@ -280,6 +280,17 @@ index 6150cb4c5efe875f37cd00dcda791bdc93e4b0d9..2d0c0782c488b23ec10db778ddccf366 const [menuOpen, setMenuOpen] = React.useState(false); const [copied, setCopied] = React.useState(false); const [mcpCopied, setMcpCopied] = React.useState(false); +@@ -50,8 +50,8 @@ export function AskAi(props) { + const pageUrl = React.useMemo(() => { + if (typeof window === 'undefined') + return ''; +- return window.location.origin + path; +- }, [path]); ++ return window.location.origin + (basePath && basePath !== '/' ? basePath.replace(/\/$/, '') : '') + path; ++ }, [path, basePath]); + const query = React.useMemo(() => { + return `Please research and analyze this page: ${pageUrl} so I can ask you questions about it. Once you have read it, prompt me with any questions I have. Do not post content from the page in your response. Any of my follow up questions must reference the site I gave you.`; + }, [pageUrl]); @@ -68,8 +68,8 @@ export function AskAi(props) { }, ], [query]); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index efbf018..cf5c6a5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,7 +5,9 @@ settings: excludeLinksFromLockfile: false patchedDependencies: - vocs: 42ffd7770dca7820ca2bf19a2c59503af07c80fc92d790921a899f6b66cc9a38 + vocs: + hash: 7587df2f2482d82298529708991c42f7dfd4d6c7b4e3a1e306c403811215eefb + path: patches/vocs.patch importers: @@ -19,7 +21,7 @@ importers: version: 19.2.7(react@19.2.7) vocs: specifier: 2.3.2 - version: 2.3.2(patch_hash=42ffd7770dca7820ca2bf19a2c59503af07c80fc92d790921a899f6b66cc9a38)(@types/react@19.2.17)(@vue/compiler-sfc@3.5.39)(react-dom@19.2.7(react@19.2.7))(react-server-dom-webpack@19.2.7(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(webpack@5.108.4(esbuild@0.28.1)))(react@19.2.7)(rollup@4.62.2)(typescript@5.9.3)(vite@8.1.3(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(tsx@4.23.13)(yaml@2.9.0))(waku@1.0.0-beta.6(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(react-dom@19.2.7(react@19.2.7))(react-server-dom-webpack@19.2.7(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(webpack@5.108.4(esbuild@0.28.1)))(react@19.2.7)(terser@5.48.0)(tsx@4.23.13)(yaml@2.9.0)) + version: 2.3.2(patch_hash=7587df2f2482d82298529708991c42f7dfd4d6c7b4e3a1e306c403811215eefb)(@types/react@19.2.17)(@vue/compiler-sfc@3.5.39)(react-dom@19.2.7(react@19.2.7))(react-server-dom-webpack@19.2.7(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(webpack@5.108.4(esbuild@0.28.1)))(react@19.2.7)(rollup@4.62.2)(typescript@5.9.3)(vite@8.1.3(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(tsx@4.23.13)(yaml@2.9.0))(waku@1.0.0-beta.6(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(react-dom@19.2.7(react@19.2.7))(react-server-dom-webpack@19.2.7(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(webpack@5.108.4(esbuild@0.28.1)))(react@19.2.7)(terser@5.48.0)(tsx@4.23.13)(yaml@2.9.0)) waku: specifier: ^1.0.0-beta.3 version: 1.0.0-beta.6(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(react-dom@19.2.7(react@19.2.7))(react-server-dom-webpack@19.2.7(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(webpack@5.108.4(esbuild@0.28.1)))(react@19.2.7)(terser@5.48.0)(tsx@4.23.13)(yaml@2.9.0) @@ -580,42 +582,36 @@ packages: engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] - libc: [glibc] '@rolldown/binding-linux-arm64-musl@1.1.4': resolution: {integrity: sha512-lZVym0PuHE1KZ22gmFTC15lAkrg9iTszR617oYRB/iPY1A56ywoJzVKOJBKaot5RiikCObmur6pogpse3gRcng==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] - libc: [musl] '@rolldown/binding-linux-ppc64-gnu@1.1.4': resolution: {integrity: sha512-t2DNiLJWNTbnEHyUzTumldML6ET4/g16467LZoDDJ3tSxGvguL5/NyC2lCsNKuyRycg9XeDQF5SSv+TNOhQEXg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [ppc64] os: [linux] - libc: [glibc] '@rolldown/binding-linux-s390x-gnu@1.1.4': resolution: {integrity: sha512-0WIRnL1Uw4BvTZRLQt+PVgo6ZKTJadlC2btP+/EOXv2f/DWbY0rEgl+y834mIVwP1FkTlWVTrGGJXf12lru7EQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [s390x] os: [linux] - libc: [glibc] '@rolldown/binding-linux-x64-gnu@1.1.4': resolution: {integrity: sha512-JWtGshGfX+oENAKonoNkqEJX+7hC8yfhi9GUyPX1VX4mdh1y5r+ZiJLR5XzAB0aoP6s/PcILsGjKq8O0mm24bw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] - libc: [glibc] '@rolldown/binding-linux-x64-musl@1.1.4': resolution: {integrity: sha512-rT6yQcxUuXs4CnbofqwHRRV0iem349rLMYpTjkgQGLjrY4ado/eDzwPZPTCgTOlF6Nkp8NEv70yLMTn6qkWxsQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] - libc: [musl] '@rolldown/binding-openharmony-arm64@1.1.4': resolution: {integrity: sha512-KXMGoboq5cyaCQjDA4GLuRiOwBQ0EyFnJoVViLeZ45/3rFItRODEr+NdsBcVpll40hhNArlm/speWGRvj08LzA==} @@ -686,79 +682,66 @@ packages: resolution: {integrity: sha512-n1GJHPOvpIfhi3TmrCeh6S6URt9BFCt0KQE3qvexyGCTAKpR4Lg+eWvNZEqu7epxwus/8ElT3hacYEucm49SZg==} cpu: [arm] os: [linux] - libc: [glibc] '@rollup/rollup-linux-arm-musleabihf@4.62.2': resolution: {integrity: sha512-JqgflS8wEB+UXV/vS1RpRbifGBeN4D5lz8D8oOFbFZw4vedvdOgCFAjfBmIMdW3yL10XpQQ0Ambepw6MXrhOnA==} cpu: [arm] os: [linux] - libc: [musl] '@rollup/rollup-linux-arm64-gnu@4.62.2': resolution: {integrity: sha512-wnFJkogWvN4jm/hQRF2UBaeUmk20j5+DmHvoyWii2b8HJDyvz1MF2OU/6ynXt2KR63rbZLWkFpoytpdc/yBuSA==} cpu: [arm64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-arm64-musl@4.62.2': resolution: {integrity: sha512-HVu2bp0zhvJ8xHEV9+UUs7S90VadmBSY3LcIMvozbPo4AuMGDWlz3ymHLHZPX4hR67TKTt8Qp5PJ5RBg/i+RMQ==} cpu: [arm64] os: [linux] - libc: [musl] '@rollup/rollup-linux-loong64-gnu@4.62.2': resolution: {integrity: sha512-mQqqAV8QaoSgr9I2fKDLY2BAVvmKjWoGiu/cSYQonsLvtqwEn1E4QYfnCOcp5zoEqNhsDYin1s6jx/VJmrxlZg==} cpu: [loong64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-loong64-musl@4.62.2': resolution: {integrity: sha512-IxKLoxCQ2IWi6bT2akyDUBGsOImDKB+sPp4EsTmwFQ/fMwpCKm8uLSSgP/Kx/QYUgKis6SEZ5/Nlhup0DIA0PQ==} cpu: [loong64] os: [linux] - libc: [musl] '@rollup/rollup-linux-ppc64-gnu@4.62.2': resolution: {integrity: sha512-Mk5ha2RQSgyFfmYYLkBpPnUk8D8FriBxesO1u9O75X0mHgXL1UQcH5Itl2lurWL2tj0RxV9b9tJgipac0hRY9A==} cpu: [ppc64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-ppc64-musl@4.62.2': resolution: {integrity: sha512-CjvEnqJL/0/TQ3TXX3OPIJ/kmBellrWd4heXUmHeJlTnmwjKpSJzoehLaL6Xk0ZnMHBu9dZuFADNOrtjF4v+2w==} cpu: [ppc64] os: [linux] - libc: [musl] '@rollup/rollup-linux-riscv64-gnu@4.62.2': resolution: {integrity: sha512-1SiZbzwdkaDURsew/tSOrooKiYy7EQGT6m8ufavAi9NEyQb/6VuIxFXAL1fqa4iZe3g4NbNk4P7J32z2tw5Mgg==} cpu: [riscv64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-riscv64-musl@4.62.2': resolution: {integrity: sha512-nQts12zJ3NQRoE6uYljOH89v7szzLDvG2JD/vsX+vGXU8w/At1GowTZ5/7qeFQ8m7L55rpR8Okugnuo5bgjy2Q==} cpu: [riscv64] os: [linux] - libc: [musl] '@rollup/rollup-linux-s390x-gnu@4.62.2': resolution: {integrity: sha512-E9/ll019jhPIJgpzfZoIkBGhcz+kKNgVWYRY0zr9srBdPPFVpvOKW8VaJKUbeK+eZXyQF9ltME+Kk6affeaPgg==} cpu: [s390x] os: [linux] - libc: [glibc] '@rollup/rollup-linux-x64-gnu@4.62.2': resolution: {integrity: sha512-5BqxR/pshjey51iliyzTD5Xi3EN0aLmQ2lZ3lvefVV9c82BvrLo2/6OT55iifpWBufs6kdwWbuOKS841DrmK9A==} cpu: [x64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-x64-musl@4.62.2': resolution: {integrity: sha512-uNN83XxQrRAh/w0/pmAfibcwyb6YWt4gP+dpnQKPVJshAloQ785ii8CT8ZCIxkGg9opVsvAlGhFitSm6D1Jjpg==} cpu: [x64] os: [linux] - libc: [musl] '@rollup/rollup-openbsd-x64@4.62.2': resolution: {integrity: sha512-srjEIxSH3LRnJN6THczDHWQplqEMFiAJrTab0msUryh9kwNpkICf3Ea6q6MN/2cZwRFUNx5w+h6Hpi4QuHS6Zg==} @@ -1052,28 +1035,24 @@ packages: engines: {node: '>= 20'} cpu: [arm64] os: [linux] - libc: [glibc] '@tailwindcss/oxide-linux-arm64-musl@4.3.2': resolution: {integrity: sha512-J5Nuk0uZQIiMTJj3LEx4sAA9tMFUoXQZFv1J6An+QGYe53HKRJuFDi0rpq/tuouCZeAbOBY3kQ6g8qeD4TUjtA==} engines: {node: '>= 20'} cpu: [arm64] os: [linux] - libc: [musl] '@tailwindcss/oxide-linux-x64-gnu@4.3.2': resolution: {integrity: sha512-kqCZpSKOBEJO4mz7OqWoofBZeXTAwaVGPj0ErAj7CojmhKpWVWVOnrt9dE8odoIraZq4oj3ausM37kXi+Tow8w==} engines: {node: '>= 20'} cpu: [x64] os: [linux] - libc: [glibc] '@tailwindcss/oxide-linux-x64-musl@4.3.2': resolution: {integrity: sha512-cixpqbh2toJDmkuCRI68nXA8ZxNmdK9Y+9v5h3MC3ZQKy/0BO8AWzlkWyRM7JAFSGBlfig4YVTPsK6MVgqz1uw==} engines: {node: '>= 20'} cpu: [x64] os: [linux] - libc: [musl] '@tailwindcss/oxide-wasm32-wasi@4.3.2': resolution: {integrity: sha512-4ec2Z/LOmRsAgU23CS4xeJfcJlmRg94A/XrbGRCF1gyU/zdDfRLYDVsS+ynSZCmGNxQ1jQriQOKMQeQxBA3Isw==} @@ -1125,28 +1104,24 @@ packages: engines: {node: '>= 12.22.0 < 13 || >= 14.17.0 < 15 || >= 15.12.0 < 16 || >= 16.0.0'} cpu: [arm64] os: [linux] - libc: [glibc] '@takumi-rs/core-linux-arm64-musl@0.62.8': resolution: {integrity: sha512-qR04H4DQfFsKmkl2kq/fh48zTC3QqBdvHjmHzJUckIktvJPKk1aK+jERIXeARkH6pfQuq+NI5Kbl1t9//qb8nQ==} engines: {node: '>= 12.22.0 < 13 || >= 14.17.0 < 15 || >= 15.12.0 < 16 || >= 16.0.0'} cpu: [arm64] os: [linux] - libc: [musl] '@takumi-rs/core-linux-x64-gnu@0.62.8': resolution: {integrity: sha512-/LouBAUVqK5/H3pwzOnitRz4JEJNrGJEN/L3TU0375M+uXFewWAl2iSwFqgMt9vCtKPrKa/oK+Iy3pdvFAnX2w==} engines: {node: '>= 12.22.0 < 13 || >= 14.17.0 < 15 || >= 15.12.0 < 16 || >= 16.0.0'} cpu: [x64] os: [linux] - libc: [glibc] '@takumi-rs/core-linux-x64-musl@0.62.8': resolution: {integrity: sha512-FIt0fpowyh9dse8F29cYBPVhrdc7Zzjz1pEyJunNzIzCIpC0yG3eUwFnK0wsoYoyzbgVZkbLRFRRAFmUORLvDg==} engines: {node: '>= 12.22.0 < 13 || >= 14.17.0 < 15 || >= 15.12.0 < 16 || >= 16.0.0'} cpu: [x64] os: [linux] - libc: [musl] '@takumi-rs/core-win32-arm64-msvc@0.62.8': resolution: {integrity: sha512-ucQmG2bp6yH+7oNQUev+0re+6FBHUOUcee4mwpQa+BKCtUSgkgQuw3ZAGdyXBQEfr3NrNsMqfc47b3Ljv3bIWA==} @@ -2213,28 +2188,24 @@ packages: engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] - libc: [glibc] lightningcss-linux-arm64-musl@1.32.0: resolution: {integrity: sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] - libc: [musl] lightningcss-linux-x64-gnu@1.32.0: resolution: {integrity: sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] - libc: [glibc] lightningcss-linux-x64-musl@1.32.0: resolution: {integrity: sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] - libc: [musl] lightningcss-win32-arm64-msvc@1.32.0: resolution: {integrity: sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==} @@ -7136,7 +7107,7 @@ snapshots: optionalDependencies: vite: 8.1.3(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(tsx@4.23.13)(yaml@2.9.0) - vocs@2.3.2(patch_hash=42ffd7770dca7820ca2bf19a2c59503af07c80fc92d790921a899f6b66cc9a38)(@types/react@19.2.17)(@vue/compiler-sfc@3.5.39)(react-dom@19.2.7(react@19.2.7))(react-server-dom-webpack@19.2.7(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(webpack@5.108.4(esbuild@0.28.1)))(react@19.2.7)(rollup@4.62.2)(typescript@5.9.3)(vite@8.1.3(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(tsx@4.23.13)(yaml@2.9.0))(waku@1.0.0-beta.6(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(react-dom@19.2.7(react@19.2.7))(react-server-dom-webpack@19.2.7(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(webpack@5.108.4(esbuild@0.28.1)))(react@19.2.7)(terser@5.48.0)(tsx@4.23.13)(yaml@2.9.0)): + vocs@2.3.2(patch_hash=7587df2f2482d82298529708991c42f7dfd4d6c7b4e3a1e306c403811215eefb)(@types/react@19.2.17)(@vue/compiler-sfc@3.5.39)(react-dom@19.2.7(react@19.2.7))(react-server-dom-webpack@19.2.7(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(webpack@5.108.4(esbuild@0.28.1)))(react@19.2.7)(rollup@4.62.2)(typescript@5.9.3)(vite@8.1.3(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(tsx@4.23.13)(yaml@2.9.0))(waku@1.0.0-beta.6(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(react-dom@19.2.7(react@19.2.7))(react-server-dom-webpack@19.2.7(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(webpack@5.108.4(esbuild@0.28.1)))(react@19.2.7)(terser@5.48.0)(tsx@4.23.13)(yaml@2.9.0)): dependencies: '@base-ui/react': 1.6.0(@types/react@19.2.17)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) '@codesandbox/sandpack-react': 2.20.0(react-dom@19.2.7(react@19.2.7))(react@19.2.7) From 6d053619743f5983c106a0e384f15554e2a7f2ef Mon Sep 17 00:00:00 2001 From: Mike H Date: Fri, 16 Oct 2026 11:35:54 -0700 Subject: [PATCH 3/4] fix: use trailing-slash page URL in AI menu splits.org redirects the no-slash URL, so the ChatGPT and Claude prompts and the copied link now use the canonical trailing-slash form, matching the canonical, sitemap, and llms.txt URLs. Co-Authored-By: Claude Opus 5.5 --- patches/vocs.patch | 9 +++++---- pnpm-lock.yaml | 6 +++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/patches/vocs.patch b/patches/vocs.patch index e5958f1..31d9a47 100644 --- a/patches/vocs.patch +++ b/patches/vocs.patch @@ -268,7 +268,7 @@ index 14b82a21ac7f3f1f1cd8871d7cd1d5e73775ad71..d52361310e500ae73ec5d8d0d0390750 function getIconType(iconUrl) { if (iconUrl.endsWith('.svg')) diff --git a/dist/react/internal/AskAi.js b/dist/react/internal/AskAi.js -index 6150cb4c5efe875f37cd00dcda791bdc93e4b0d9..89c104ffaa906485268472cc03544ef7fd8781f0 100644 +index 6150cb4c5efe875f37cd00dcda791bdc93e4b0d9..8f470636d4a56cfc37c4d42bfa883789c2a838b4 100644 --- a/dist/react/internal/AskAi.js +++ b/dist/react/internal/AskAi.js @@ -14,7 +14,7 @@ import { getMarkdownAssetPath } from './markdown-url.js'; @@ -280,18 +280,19 @@ index 6150cb4c5efe875f37cd00dcda791bdc93e4b0d9..89c104ffaa906485268472cc03544ef7 const [menuOpen, setMenuOpen] = React.useState(false); const [copied, setCopied] = React.useState(false); const [mcpCopied, setMcpCopied] = React.useState(false); -@@ -50,8 +50,8 @@ export function AskAi(props) { +@@ -50,8 +50,9 @@ export function AskAi(props) { const pageUrl = React.useMemo(() => { if (typeof window === 'undefined') return ''; - return window.location.origin + path; - }, [path]); -+ return window.location.origin + (basePath && basePath !== '/' ? basePath.replace(/\/$/, '') : '') + path; ++ // Trailing-slash form: splits.org redirects the no-slash URL to it. ++ return window.location.origin + (basePath && basePath !== '/' ? basePath.replace(/\/$/, '') : '') + path.replace(/\/?$/, '/'); + }, [path, basePath]); const query = React.useMemo(() => { return `Please research and analyze this page: ${pageUrl} so I can ask you questions about it. Once you have read it, prompt me with any questions I have. Do not post content from the page in your response. Any of my follow up questions must reference the site I gave you.`; }, [pageUrl]); -@@ -68,8 +68,8 @@ export function AskAi(props) { +@@ -68,8 +69,8 @@ export function AskAi(props) { }, ], [query]); const markdownUrl = React.useMemo(() => { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cf5c6a5..b7e32d8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,7 +6,7 @@ settings: patchedDependencies: vocs: - hash: 7587df2f2482d82298529708991c42f7dfd4d6c7b4e3a1e306c403811215eefb + hash: 1778e3ef958e9a97577ed84621409b4f62ba99cb1d4cd1f1034c09665612b9bc path: patches/vocs.patch importers: @@ -21,7 +21,7 @@ importers: version: 19.2.7(react@19.2.7) vocs: specifier: 2.3.2 - version: 2.3.2(patch_hash=7587df2f2482d82298529708991c42f7dfd4d6c7b4e3a1e306c403811215eefb)(@types/react@19.2.17)(@vue/compiler-sfc@3.5.39)(react-dom@19.2.7(react@19.2.7))(react-server-dom-webpack@19.2.7(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(webpack@5.108.4(esbuild@0.28.1)))(react@19.2.7)(rollup@4.62.2)(typescript@5.9.3)(vite@8.1.3(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(tsx@4.23.13)(yaml@2.9.0))(waku@1.0.0-beta.6(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(react-dom@19.2.7(react@19.2.7))(react-server-dom-webpack@19.2.7(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(webpack@5.108.4(esbuild@0.28.1)))(react@19.2.7)(terser@5.48.0)(tsx@4.23.13)(yaml@2.9.0)) + version: 2.3.2(patch_hash=1778e3ef958e9a97577ed84621409b4f62ba99cb1d4cd1f1034c09665612b9bc)(@types/react@19.2.17)(@vue/compiler-sfc@3.5.39)(react-dom@19.2.7(react@19.2.7))(react-server-dom-webpack@19.2.7(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(webpack@5.108.4(esbuild@0.28.1)))(react@19.2.7)(rollup@4.62.2)(typescript@5.9.3)(vite@8.1.3(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(tsx@4.23.13)(yaml@2.9.0))(waku@1.0.0-beta.6(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(react-dom@19.2.7(react@19.2.7))(react-server-dom-webpack@19.2.7(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(webpack@5.108.4(esbuild@0.28.1)))(react@19.2.7)(terser@5.48.0)(tsx@4.23.13)(yaml@2.9.0)) waku: specifier: ^1.0.0-beta.3 version: 1.0.0-beta.6(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(react-dom@19.2.7(react@19.2.7))(react-server-dom-webpack@19.2.7(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(webpack@5.108.4(esbuild@0.28.1)))(react@19.2.7)(terser@5.48.0)(tsx@4.23.13)(yaml@2.9.0) @@ -7107,7 +7107,7 @@ snapshots: optionalDependencies: vite: 8.1.3(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(tsx@4.23.13)(yaml@2.9.0) - vocs@2.3.2(patch_hash=7587df2f2482d82298529708991c42f7dfd4d6c7b4e3a1e306c403811215eefb)(@types/react@19.2.17)(@vue/compiler-sfc@3.5.39)(react-dom@19.2.7(react@19.2.7))(react-server-dom-webpack@19.2.7(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(webpack@5.108.4(esbuild@0.28.1)))(react@19.2.7)(rollup@4.62.2)(typescript@5.9.3)(vite@8.1.3(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(tsx@4.23.13)(yaml@2.9.0))(waku@1.0.0-beta.6(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(react-dom@19.2.7(react@19.2.7))(react-server-dom-webpack@19.2.7(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(webpack@5.108.4(esbuild@0.28.1)))(react@19.2.7)(terser@5.48.0)(tsx@4.23.13)(yaml@2.9.0)): + vocs@2.3.2(patch_hash=1778e3ef958e9a97577ed84621409b4f62ba99cb1d4cd1f1034c09665612b9bc)(@types/react@19.2.17)(@vue/compiler-sfc@3.5.39)(react-dom@19.2.7(react@19.2.7))(react-server-dom-webpack@19.2.7(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(webpack@5.108.4(esbuild@0.28.1)))(react@19.2.7)(rollup@4.62.2)(typescript@5.9.3)(vite@8.1.3(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(tsx@4.23.13)(yaml@2.9.0))(waku@1.0.0-beta.6(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(react-dom@19.2.7(react@19.2.7))(react-server-dom-webpack@19.2.7(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(webpack@5.108.4(esbuild@0.28.1)))(react@19.2.7)(terser@5.48.0)(tsx@4.23.13)(yaml@2.9.0)): dependencies: '@base-ui/react': 1.6.0(@types/react@19.2.17)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) '@codesandbox/sandpack-react': 2.20.0(react-dom@19.2.7(react@19.2.7))(react@19.2.7) From 8c0589cd30acce3eddbc60fd47776b6fae8d457e Mon Sep 17 00:00:00 2001 From: Mike H Date: Fri, 16 Oct 2026 12:16:15 -0700 Subject: [PATCH 4/4] fix: point AI menu markdown links at the public twin URL Vercel serves everything under /docs/assets/ as immutable for a year, and markdown twins keep the same name across deploys, so browsers would keep showing a stale copy in Copy page for AI and View as Markdown. Use /docs/.md, the URL llms.txt links, which is served with must-revalidate. Also simplify the base-path prefix in the AI menu page URL. Co-Authored-By: Claude Opus 5.5 --- patches/vocs.patch | 9 ++++++--- pnpm-lock.yaml | 6 +++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/patches/vocs.patch b/patches/vocs.patch index 31d9a47..ff43b50 100644 --- a/patches/vocs.patch +++ b/patches/vocs.patch @@ -287,7 +287,7 @@ index 6150cb4c5efe875f37cd00dcda791bdc93e4b0d9..8f470636d4a56cfc37c4d42bfa883789 - return window.location.origin + path; - }, [path]); + // Trailing-slash form: splits.org redirects the no-slash URL to it. -+ return window.location.origin + (basePath && basePath !== '/' ? basePath.replace(/\/$/, '') : '') + path.replace(/\/?$/, '/'); ++ return window.location.origin + basePath.replace(/\/$/, '') + path.replace(/\/?$/, '/'); + }, [path, basePath]); const query = React.useMemo(() => { return `Please research and analyze this page: ${pageUrl} so I can ask you questions about it. Once you have read it, prompt me with any questions I have. Do not post content from the page in your response. Any of my follow up questions must reference the site I gave you.`; @@ -414,12 +414,15 @@ diff --git a/dist/react/internal/markdown-url.js b/dist/react/internal/markdown- index 5397bdf40f789fc4f8fe45b3a3e4e71416b5a7f4..e31fcc7036322468eb5e967d41a995f5fabcc874 100644 --- a/dist/react/internal/markdown-url.js +++ b/dist/react/internal/markdown-url.js -@@ -1,5 +1,5 @@ +@@ -1,5 +1,8 @@ -export function getMarkdownAssetPath(path) { +export function getMarkdownAssetPath(path, basePath = '/') { const pagePath = path === '/' ? '/index' : path.replace(/\/$/, ''); - return `/assets/md${pagePath}.md`; -+ return `${basePath.replace(/\/$/, '')}/assets/md${pagePath}.md`; ++ // The public twin URL (what llms.txt links), not /assets/md/: everything ++ // under /assets/ is served immutable for a year, and twins are ++ // not content-hashed, so a cached copy would never refresh. ++ return `${basePath.replace(/\/$/, '')}${pagePath}.md`; } //# sourceMappingURL=markdown-url.js.map diff --git a/dist/waku/internal/dedupe-head.js b/dist/waku/internal/dedupe-head.js diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b7e32d8..6a93eb4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,7 +6,7 @@ settings: patchedDependencies: vocs: - hash: 1778e3ef958e9a97577ed84621409b4f62ba99cb1d4cd1f1034c09665612b9bc + hash: 3ce0ce376902071cdca4042f2a4b4bf147a1d5d335f2ae63c61af8caeff97bac path: patches/vocs.patch importers: @@ -21,7 +21,7 @@ importers: version: 19.2.7(react@19.2.7) vocs: specifier: 2.3.2 - version: 2.3.2(patch_hash=1778e3ef958e9a97577ed84621409b4f62ba99cb1d4cd1f1034c09665612b9bc)(@types/react@19.2.17)(@vue/compiler-sfc@3.5.39)(react-dom@19.2.7(react@19.2.7))(react-server-dom-webpack@19.2.7(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(webpack@5.108.4(esbuild@0.28.1)))(react@19.2.7)(rollup@4.62.2)(typescript@5.9.3)(vite@8.1.3(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(tsx@4.23.13)(yaml@2.9.0))(waku@1.0.0-beta.6(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(react-dom@19.2.7(react@19.2.7))(react-server-dom-webpack@19.2.7(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(webpack@5.108.4(esbuild@0.28.1)))(react@19.2.7)(terser@5.48.0)(tsx@4.23.13)(yaml@2.9.0)) + version: 2.3.2(patch_hash=3ce0ce376902071cdca4042f2a4b4bf147a1d5d335f2ae63c61af8caeff97bac)(@types/react@19.2.17)(@vue/compiler-sfc@3.5.39)(react-dom@19.2.7(react@19.2.7))(react-server-dom-webpack@19.2.7(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(webpack@5.108.4(esbuild@0.28.1)))(react@19.2.7)(rollup@4.62.2)(typescript@5.9.3)(vite@8.1.3(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(tsx@4.23.13)(yaml@2.9.0))(waku@1.0.0-beta.6(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(react-dom@19.2.7(react@19.2.7))(react-server-dom-webpack@19.2.7(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(webpack@5.108.4(esbuild@0.28.1)))(react@19.2.7)(terser@5.48.0)(tsx@4.23.13)(yaml@2.9.0)) waku: specifier: ^1.0.0-beta.3 version: 1.0.0-beta.6(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(react-dom@19.2.7(react@19.2.7))(react-server-dom-webpack@19.2.7(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(webpack@5.108.4(esbuild@0.28.1)))(react@19.2.7)(terser@5.48.0)(tsx@4.23.13)(yaml@2.9.0) @@ -7107,7 +7107,7 @@ snapshots: optionalDependencies: vite: 8.1.3(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(tsx@4.23.13)(yaml@2.9.0) - vocs@2.3.2(patch_hash=1778e3ef958e9a97577ed84621409b4f62ba99cb1d4cd1f1034c09665612b9bc)(@types/react@19.2.17)(@vue/compiler-sfc@3.5.39)(react-dom@19.2.7(react@19.2.7))(react-server-dom-webpack@19.2.7(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(webpack@5.108.4(esbuild@0.28.1)))(react@19.2.7)(rollup@4.62.2)(typescript@5.9.3)(vite@8.1.3(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(tsx@4.23.13)(yaml@2.9.0))(waku@1.0.0-beta.6(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(react-dom@19.2.7(react@19.2.7))(react-server-dom-webpack@19.2.7(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(webpack@5.108.4(esbuild@0.28.1)))(react@19.2.7)(terser@5.48.0)(tsx@4.23.13)(yaml@2.9.0)): + vocs@2.3.2(patch_hash=3ce0ce376902071cdca4042f2a4b4bf147a1d5d335f2ae63c61af8caeff97bac)(@types/react@19.2.17)(@vue/compiler-sfc@3.5.39)(react-dom@19.2.7(react@19.2.7))(react-server-dom-webpack@19.2.7(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(webpack@5.108.4(esbuild@0.28.1)))(react@19.2.7)(rollup@4.62.2)(typescript@5.9.3)(vite@8.1.3(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(terser@5.48.0)(tsx@4.23.13)(yaml@2.9.0))(waku@1.0.0-beta.6(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(react-dom@19.2.7(react@19.2.7))(react-server-dom-webpack@19.2.7(react-dom@19.2.7(react@19.2.7))(react@19.2.7)(webpack@5.108.4(esbuild@0.28.1)))(react@19.2.7)(terser@5.48.0)(tsx@4.23.13)(yaml@2.9.0)): dependencies: '@base-ui/react': 1.6.0(@types/react@19.2.17)(react-dom@19.2.7(react@19.2.7))(react@19.2.7) '@codesandbox/sandpack-react': 2.20.0(react-dom@19.2.7(react@19.2.7))(react@19.2.7)