diff --git a/.gitignore b/.gitignore index 0ec8d86c..ad1059e1 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,7 @@ .rubocop-* CLAUDE.md +# Local planning artifacts — never commit +TODO* +**/TODO* + diff --git a/docs/.vitepress/theme/FormulaBrowser.vue b/docs/.vitepress/theme/FormulaBrowser.vue index df686037..6582edd9 100644 --- a/docs/.vitepress/theme/FormulaBrowser.vue +++ b/docs/.vitepress/theme/FormulaBrowser.vue @@ -7,6 +7,7 @@ const formulasData = ref([]) const searchQuery = ref('') const selectedLicenses = ref(['all']) const selectedSources = ref(['all']) +const basePath = import.meta.env.BASE_URL || '/' const licenseOptions = [ { value: 'all', label: 'All Licenses', icon: 'all', count: 0 }, @@ -211,8 +212,9 @@ function goToFormula(slug) { // "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}/` + // No trailing slash: cleanUrls:true route map expects /browse/foo, and + // GitHub Pages serves /browse/foo/index.html for either form. + window.location.href = `${basePath}browse/${slug}` } function toggleLicense(value) { @@ -266,7 +268,7 @@ function toggleSource(value) {