diff --git a/.gitignore b/.gitignore index a094eaba..a55e8364 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,6 @@ _site node_modules .cache -.11ty-vite # local dependencies .env.local diff --git a/src/assets/js/index.js b/src/assets/js/index.js index b7219cbc..7270e9d4 100644 --- a/src/assets/js/index.js +++ b/src/assets/js/index.js @@ -110,7 +110,7 @@ window.addEventListener('load', () => { const loadSearchIndex = async () => { try { - const response = await fetch('/data/search.json') + const response = await fetch('/api/search') const index = await response.json() const resultsById = index.reduce((byId, result) => { byId[result.id] = result diff --git a/src/pages/data/search.json.liquid b/src/pages/data/search.json.liquid index e8578c8f..ae4ac018 100644 --- a/src/pages/data/search.json.liquid +++ b/src/pages/data/search.json.liquid @@ -1,4 +1,4 @@ --- -permalink: "/data/search.json" +permalink: "/api/search" --- {{ search | json }} \ No newline at end of file