Skip to content

Latest commit

 

History

History
105 lines (77 loc) · 1.54 KB

File metadata and controls

105 lines (77 loc) · 1.54 KB

pagefind-proxima

Astro integration for Pagefind with a ready Search component.

EN

Install

bun add pagefind-proxima

Setup (astro.config.mjs)

import { defineConfig } from "astro/config";
import pagefindProxima from "pagefind-proxima";

export default defineConfig({
  integrations: [pagefindProxima()],
});

Use component

---
import Search from "pagefind-proxima/components/Search";
---

<Search styleMode="css" />

Tailwind mode

<Search
  styleMode="tailwind"
  styles={{
    input: "text-sm md:text-base",
    button: "bg-black text-white border-black"
  }}
/>

Hotkeys (cmd+k, esc)

<Search
  overlay={{ enabled: true, defaultOpen: false }}
  hotkeys={{ cmdK: true, esc: true }}
/>

RU

Установка

bun add pagefind-proxima

Подключение (astro.config.mjs)

import { defineConfig } from "astro/config";
import pagefindProxima from "pagefind-proxima";

export default defineConfig({
  integrations: [pagefindProxima()],
});

Использование компонента

---
import Search from "pagefind-proxima/components/Search";
---

<Search styleMode="css" />

Режим Tailwind

<Search
  styleMode="tailwind"
  styles={{
    input: "text-sm md:text-base",
    button: "bg-black text-white border-black"
  }}
/>

Горячие клавиши (cmd+k, esc)

<Search
  overlay={{ enabled: true, defaultOpen: false }}
  hotkeys={{ cmdK: true, esc: true }}
/>