From 7a2a2aa9513d5fb2a566b567f013d743a7bd641e Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Fri, 18 Oct 2024 18:12:01 -0700 Subject: [PATCH] Revert "fix: be less precious about data formats" This reverts commit 84e5e918944b798a7409a7052477883e5d5cd935. --- .gitignore | 1 - src/assets/js/index.js | 2 +- src/pages/data/search.json.liquid | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) 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