Skip to content

Commit

Permalink
feat: use pagefind for searching (resolves #262, #227, #153) (#263)
Browse files Browse the repository at this point in the history
* feat: use pagefind for searching

* ci: update test command

* fix: hover styling for search results

* fix: add space between footer and load more results
  • Loading branch information
jobara committed Apr 24, 2024
1 parent dfc8920 commit f9ed3a6
Show file tree
Hide file tree
Showing 24 changed files with 400 additions and 6,350 deletions.
3 changes: 2 additions & 1 deletion .fluidlintallrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"lintspaces": {
"newlines": {
"excludes": [
"*.ttf"
"*.ttf",
"*.DS_Store"
]
}
}
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,4 @@ jobs:
npm run build
- name: Node tests
run: npm run test:node

- name: Browser Tests
run: xvfb-run --auto-servernum npm run test:browser

- name: Cleanup after xvfb
uses: bcomnes/cleanup-xvfb@v1
run: npm run test
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,9 @@ The documentation will be available at [http://localhost:8000](http://localhost:
* To stop and remove the container: `docker rm -f infusion-docs`

If you make changes to the documentation, repeat the steps to build the image and start a new container.

## 3rd party software included

### MIT License

* [Heroicons v2.1.1](https://heroicons.com)
10 changes: 7 additions & 3 deletions eleventy.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2014-2022 OCAD University
Copyright 2014-2024 OCAD University
Copyright 2017 Raising the Floor, International
Licensed under the Educational Community License (ECL), Version 2.0 or the New
Expand All @@ -12,6 +12,7 @@
"use strict";

var githubSlugify = require("github-slugger").slug;
var {exec} = require("child_process");

require("./index.js");
var hljs = require("highlight.js");
Expand Down Expand Up @@ -72,8 +73,11 @@ module.exports = function (eleventyConfig) {
return "/infusion/development" + href;
});

eleventyConfig.on("afterBuild", () => {
require("./src/scripts/create-search-digest");
eleventyConfig.on("afterBuild", async () => {
// TODO: Once 11ty v3 is stable and the project updated to use it, it will be possible to use Pagefind's
// NodeJS API instead of calling `npx` with `exec`. This is because 11ty currently doesn't support ES6 modules.
// https://pagefind.app/docs/node-api/
await exec("npx pagefind");
});

return {
Expand Down
Loading

0 comments on commit f9ed3a6

Please sign in to comment.