mirror of
https://github.com/MaggieAppleton/digital-gardeners.git
synced 2025-09-25 09:23:39 +02:00
initial setup
This commit is contained in:
parent
6a2bde16e5
commit
6792dabecb
27 changed files with 4436 additions and 0 deletions
23
scripts/build-search.js
Normal file
23
scripts/build-search.js
Normal file
|
@ -0,0 +1,23 @@
|
|||
const dotenv = require("dotenv");
|
||||
const fetch = require("node-fetch");
|
||||
const algoliasearch = require("algoliasearch/lite");
|
||||
|
||||
async function getAllBlogPosts() {
|
||||
// write your code to fetch your data
|
||||
}
|
||||
|
||||
(async function () {
|
||||
// initialize environment variables
|
||||
dotenv.config();
|
||||
|
||||
try {
|
||||
// fetch your data
|
||||
const posts = await getAllBlogPosts();
|
||||
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
})();
|
||||
|
||||
// To be continued: https://www.contentful.com/blog/2021/07/02/add-algolia-instantsearch-to-nextjs-app/
|
Loading…
Add table
Add a link
Reference in a new issue