diff --git a/docs/.vitepress/theme/FormulaBrowser.vue b/docs/.vitepress/theme/FormulaBrowser.vue index f6fb38a8..df686037 100644 --- a/docs/.vitepress/theme/FormulaBrowser.vue +++ b/docs/.vitepress/theme/FormulaBrowser.vue @@ -204,6 +204,17 @@ function scrollToLetter(letter) { if (el) el.scrollIntoView({ behavior: 'smooth', block: 'start' }) } +function goToFormula(slug) { + // Formula pages are rendered in CI batches (docs.yml build-batch matrix), + // and each batch's VitePress router manifest only includes its own pages. + // SPA navigation from /browse/ to a formula in a different batch hits a + // "Page not found" 404 even though the SSR HTML exists on the server. + // Bypass SPA routing for formula clicks — full page load fetches the + // correct HTML which loads the correct app chunk for that formula's batch. + const basePath = import.meta.env.BASE_URL || '/' + window.location.href = `${basePath}browse/${slug}/` +} + function toggleLicense(value) { if (value === 'all') { selectedLicenses.value = ['all'] @@ -255,7 +266,7 @@ function toggleSource(value) {