Skip to content

Commit

Permalink
Allow to configure pagefind
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarotero committed Jul 19, 2023
1 parent 38adf7a commit 34e134e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this
project adheres to [Semantic Versioning](http://semver.org/).

## [0.10.0] - 2023-07-19
### Added
- Allow to configure `pagefind` plugin.

## [0.9.0] - 2023-07-17
### Added
- Allow to configure `date` plugin.
- New `_data/i18n.yml` file to customize or translate the static copies.

Expand Down Expand Up @@ -120,6 +125,7 @@ First version
[#1]: https://github.com/lumeland/theme-simple-blog/issues/1
[#5]: https://github.com/lumeland/theme-simple-blog/issues/5

[0.10.0]: https://github.com/lumeland/theme-simple-blog/compare/v0.9.0...v0.10.0
[0.9.0]: https://github.com/lumeland/theme-simple-blog/compare/v0.8.0...v0.9.0
[0.8.0]: https://github.com/lumeland/theme-simple-blog/compare/v0.7.2...v0.8.0
[0.7.2]: https://github.com/lumeland/theme-simple-blog/compare/v0.7.1...v0.7.2
Expand Down
5 changes: 3 additions & 2 deletions plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import basePath from "lume/plugins/base_path.ts";
import slugifyUrls from "lume/plugins/slugify_urls.ts";
import resolveUrls from "lume/plugins/resolve_urls.ts";
import metas from "lume/plugins/metas.ts";
import pagefind from "lume/plugins/pagefind.ts";
import pagefind, { Options as PagefindOptions } from "lume/plugins/pagefind.ts";
import sitemap from "lume/plugins/sitemap.ts";
import feed from "lume/plugins/feed.ts";
import vento from "lume/plugins/vento.ts";
Expand All @@ -19,6 +19,7 @@ import type { Page, Site } from "lume/core.ts";
export interface Options {
prism?: Partial<PrismOptions>;
date?: Partial<DateOptions>;
pagefind?: Partial<PagefindOptions>;
}

/** Configure the site */
Expand All @@ -34,7 +35,7 @@ export default function (options: Options = {}) {
.use(image())
.use(resolveUrls())
.use(slugifyUrls())
.use(pagefind())
.use(pagefind(options.pagefind))
.use(terser())
.use(sitemap())
.use(vento())
Expand Down

0 comments on commit 34e134e

Please sign in to comment.