remove search page and added search modal

This commit is contained in:
somrat sorkar
2023-12-11 15:00:43 +06:00
parent 4c3b181a46
commit 5da3079efb
12 changed files with 702 additions and 242 deletions
-19
View File
@@ -1,19 +0,0 @@
---
import Base from "@/layouts/Base.astro";
import SearchLayout from "@/layouts/Search";
import { getSinglePage } from "@/lib/contentParser.astro";
const BLOG_FOLDER = "blog";
const posts = await getSinglePage(BLOG_FOLDER);
// List of items to search in
const searchList = posts.map((item) => ({
slug: item.slug,
data: item.data,
content: item.body,
}));
---
<Base title={`Search`}>
<SearchLayout client:load searchList={searchList} />
</Base>