Skip to content

Commit

Permalink
fix: pagefind v1 migration
Browse files Browse the repository at this point in the history
  • Loading branch information
shishkin committed Oct 11, 2023
1 parent 079a89e commit 2777960
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/astro-pagefind/src/components/Search.astro
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export interface Props {
}
const { id, className, query } = Astro.props as Props;
const bundlePath = `${import.meta.env.BASE_URL}_pagefind/`;
const bundlePath = `${import.meta.env.BASE_URL}pagefind/`;
const divProps = {
...(id ? { id } : {}),
...(className ? { class: className } : {}),
Expand Down
4 changes: 2 additions & 2 deletions packages/astro-pagefind/src/pagefind.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default function pagefind(): AstroIntegration {
etag: true,
});
server.middlewares.use((req, res, next) => {
if (req.url?.startsWith("/_pagefind/")) {
if (req.url?.startsWith("/pagefind/")) {
serve(req, res, next);
} else {
next();
Expand All @@ -53,7 +53,7 @@ export default function pagefind(): AstroIntegration {
);
return;
}
const cmd = `npx pagefind --source "${outDir}"`;
const cmd = `npx pagefind --site "${outDir}"`;
execSync(cmd, {
stdio: [process.stdin, process.stdout, process.stderr],
});
Expand Down

0 comments on commit 2777960

Please sign in to comment.