Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use pagefind for searching (resolves #262, #227, #153) #263

Merged
merged 4 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
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
Loading