0.3.5 • Published 9 days ago

@itsmatteomanf/astro-pagefind v0.3.5

Weekly downloads
-
License
MIT
Repository
github
Last release
9 days ago

@itsmatteomanf/astro-pagefind

This is an Astro integration that runs the indexing operation for Pagefind directly during Astro's build.

Usage

Prerequisites

You need to be using astro@4.0.0 or higher, and pagefind@1.0.0 or higher must be installed and in use, as this package just runs the indexing.

Installation

Install the integration automatically using the Astro CLI:

pnpm astro add @itsmatteomanf/astro-pagefind
npx astro add @itsmatteomanf/astro-pagefind
yarn astro add @itsmatteomanf/astro-pagefind

Or install it manually:

  1. Install the required dependencies
pnpm add @itsmatteomanf/astro-pagefind
npm install @itsmatteomanf/astro-pagefind
yarn add @itsmatteomanf/astro-pagefind
  1. Add the integration to your astro config
+import pagefind from "@itsmatteomanf/astro-pagefind";

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

Configuration

No configuration is necessary for the integration to work.

The configuration object allows configuring some aspects of Pagefind.

const options = {
  index: {
    rootSelector: undefined,
    excludeSelectors: undefined,
    forceLanguage: undefined,
    keepIndexUrl: undefined,
    verbose: undefined,
    logfile: undefined,
  },
  directories: [""],
  site: "pagefind",
};

All the settings align with Pagefind's CLI, at https://pagefind.app/docs/config-options/. If the optipon is not listed here, it's not suppoerted by this integration.

Directories are relative to the output directory of your Astro project, so "" will match the root of the output folder.

Licensing

MIT Licensed. Made with ❤️ by Matteo Manfredi.

0.3.5

9 days ago

0.3.4

13 days ago

0.3.3

13 days ago

0.3.2

13 days ago

0.3.1

13 days ago

0.3.0

13 days ago

0.2.1

13 days ago

0.2.0

13 days ago

0.1.0

13 days ago