Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"@types/node": "npm:@types/node@^24.3.0",
"@types/pg": "npm:@types/pg@^8.15.5",
"@types/prismjs": "npm:@types/prismjs@^1.26.5",
"docsearch": "https://esm.sh/@docsearch/js@3.5.2?target=es2020",
"docsearch": "npm:@docsearch/js@^3.5.2",
"esbuild": "npm:esbuild@0.25.7",
"esbuild-wasm": "npm:esbuild-wasm@0.25.7",
"fresh": "jsr:@fresh/core@^2.0.0",
Expand Down Expand Up @@ -91,7 +91,7 @@

"@std/front-matter": "jsr:@std/front-matter@^1.0.5",
"github-slugger": "npm:github-slugger@^2.0.0",
"imagescript": "https://deno.land/x/imagescript@1.3.0/mod.ts",
"imagescript": "jsr:@matmen/imagescript@^1.3.0",
"marked": "npm:marked@^15.0.11",
"marked-mangle": "npm:marked-mangle@^1.1.9",
"prismjs": "npm:prismjs@^1.29.0",
Expand Down
222 changes: 192 additions & 30 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion www/islands/SearchButton.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useEffect, useRef } from "preact/hooks";
import docsearch from "docsearch";
import docsearchModule from "docsearch";

// Copied from algolia source code
type DocSearchProps = {
Expand All @@ -9,6 +9,11 @@ type DocSearchProps = {
container: HTMLElement | string;
};

// Workaround: Deno resolves this npm package as CJS, hiding the callable default export
const docsearch = docsearchModule as unknown as (
props: DocSearchProps,
) => void;

export default function SearchButton(
props: { docsearch?: (args: DocSearchProps) => void; class?: string },
) {
Expand Down
Loading