fix search api imports, move unicornProfilePicMap to json fetch

This commit is contained in:
James Fenn
2023-02-12 00:14:15 -05:00
parent ca8e0e12bf
commit 43db01ca5c
8 changed files with 1982 additions and 49 deletions

View File

@@ -40,13 +40,6 @@ export const createIndex = async () => {
};
createIndex().then((index) => {
const js = `const index = {
index: ${JSON.stringify(index)},
posts: ${JSON.stringify(posts)}
}
export default index;
`;
fs.writeFileSync(path.resolve(process.cwd(), "./public/searchIndex.js"), js);
const json = JSON.stringify({ index, posts });
fs.writeFileSync(path.resolve(process.cwd(), "./api/searchIndex.json"), json);
});