-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
closes #11
- Loading branch information
Showing
8 changed files
with
292 additions
and
497 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,18 @@ | ||
import { defineConfig } from "astro/config"; | ||
import pagefind from "./src/pagefind.js"; | ||
import node from "@astrojs/node"; | ||
|
||
export default defineConfig({ | ||
base: "/something/", | ||
output: "hybrid", | ||
experimental: { | ||
hybridOutput: true, | ||
}, | ||
build: { | ||
format: "file", | ||
}, | ||
integrations: [pagefind()], | ||
adapter: node({ | ||
mode: "standalone", | ||
}), | ||
}); |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
export interface Props { | ||
readonly id?: string; | ||
readonly className?: string; | ||
readonly query?: string; | ||
} | ||
|
||
export default function Search(props: Props): any; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
import Search from "../components/Search.astro"; | ||
export const prerender = false; | ||
const q = Astro.url.searchParams.get("q") ?? undefined; | ||
--- | ||
|
||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width" /> | ||
<title>astro-pagefind</title> | ||
</head> | ||
<body> | ||
<h1>Pre-filled Search</h1> | ||
<p>Searching for: {q}</p> | ||
<Search id="search" query={q} /> | ||
</body> | ||
</html> |