fix: be less precious about data formats

This commit is contained in:
Cory Dransfeldt 2024-10-18 17:57:46 -07:00
parent 68d941af6b
commit 84e5e91894
No known key found for this signature in database
3 changed files with 3 additions and 2 deletions

1
.gitignore vendored
View file

@ -2,6 +2,7 @@
_site _site
node_modules node_modules
.cache .cache
.11ty-vite
# local dependencies # local dependencies
.env.local .env.local

View file

@ -110,7 +110,7 @@ window.addEventListener('load', () => {
const loadSearchIndex = async () => { const loadSearchIndex = async () => {
try { try {
const response = await fetch('/api/search') const response = await fetch('/data/search.json')
const index = await response.json() const index = await response.json()
const resultsById = index.reduce((byId, result) => { const resultsById = index.reduce((byId, result) => {
byId[result.id] = result byId[result.id] = result

View file

@ -1,4 +1,4 @@
--- ---
permalink: "/api/search" permalink: "/data/search.json"
--- ---
{{ search | json }} {{ search | json }}