Skip to content

Commit cd29bda

Browse files
authored
Fix Path Error for pagefind in package_abridge.js (#209)
* fix(build): correct path for pagefind file operations Adjust file paths in package_abridge.js * fix: auto creates the `static/js` directory.
1 parent e326d6b commit cd29bda

16 files changed

+114
-109
lines changed

config.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ taxonomies = [
2525

2626
[search] # Options specific to elasticlunr search.
2727
# index format can be: elasticlunr_json or elasticlunr_javascript or fuse_json
28-
index_format = "elasticlunr_json"
28+
index_format = "fuse_json"
2929
include_title = true # include title of page/section in index
3030
include_description = true # include description of page/section in index
3131
include_content = true # include rendered content of page/section in index
@@ -221,7 +221,7 @@ js_prestyle = true # used to preload: FontAwesome, Katex, external Google Fonts
221221
js_switcher = true # The button that allows manually changing between light/dark mode.
222222
js_switcher_default = "dark" # default nojs switcher mode: dark, light (make sure to also set $switcherDefault in abridge.scss)
223223

224-
search_library = "elasticlunr"
224+
search_library = "pagefind"
225225
stylesheets = ["abridge.css"]
226226

227227
webmanifest = "manifest.min.json" # Required for PWAs

package_abridge.js

Lines changed: 100 additions & 98 deletions
Large diffs are not rendered by default.

static/_headers

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
Referrer-Policy: strict-origin-when-cross-origin
99
Strict-Transport-Security: max-age=63072000; includeSubdomains
1010
Permissions-Policy: interest-cohort=(), accelerometer=(), ambient-light-sensor=(), battery=(), bluetooth=(), browsing-topics=(), camera=(), display-capture=(), document-domain=(), encrypted-media=(), execution-while-not-rendered=(), execution-while-out-of-viewport=(), fullscreen=(), gamepad=(), geolocation=(), gyroscope=(), hid=(), identity-credentials-get=(), idle-detection=(), magnetometer=(), microphone=(), midi=(), otp-credentials=(), payment=(), picture-in-picture=(), publickey-credentials-create=(), publickey-credentials-get=(), serial=(), storage-access=(), sync-xhr=(), usb=(), web-share=(), window-management=(), xr-spatial-tracking=()
11-
Content-Security-Policy: default-src 'none'; frame-ancestors 'none'; object-src 'none'; base-uri 'self'; manifest-src 'self'; worker-src 'self'; form-action 'self'; connect-src 'self' *.hyvor.com ws://*.hyvor.com; script-src 'self' talk.hyvor.com; img-src 'self' data: talk.hyvor.com cdn.cloudflare.com; frame-src 'self' www.youtube-nocookie.com player.vimeo.com streamable.com www.streamable.com; media-src 'self' data: cdn.cloudflare.com www.youtube-nocookie.com player.vimeo.com; font-src 'self' cdn.cloudflare.com cdn.jsdelivr.net fonts.gstatic.com; style-src 'self' talk.hyvor.com cdn.cloudflare.com cdn.jsdelivr.net fonts.googleapis.com;
11+
Content-Security-Policy: default-src 'none'; frame-ancestors 'none'; object-src 'none'; base-uri 'self'; manifest-src 'self'; worker-src 'self'; form-action 'self'; connect-src 'self' *.hyvor.com ws://*.hyvor.com; script-src 'wasm-unsafe-eval' 'self' talk.hyvor.com; img-src 'self' data: talk.hyvor.com cdn.cloudflare.com; frame-src 'self' www.youtube-nocookie.com player.vimeo.com streamable.com www.streamable.com; media-src 'self' data: cdn.cloudflare.com www.youtube-nocookie.com player.vimeo.com; font-src 'self' cdn.cloudflare.com cdn.jsdelivr.net fonts.gstatic.com; style-src 'self' talk.hyvor.com cdn.cloudflare.com cdn.jsdelivr.net fonts.googleapis.com;
1212

1313
/*.js
1414
Cache-Control: public, max-age=604800, must-revalidate

static/js/abridge.min.js

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

static/js/abridge_nopwa.min.js

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

static/js/abridge_nosearch.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

static/js/abridge_nosearch_nopwa.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"version":"1.1.1","languages":{"en":{"hash":"en_3c26f37e1b","wasm":"en","page_count":15},"es":{"hash":"es_ae1ee7146e","wasm":"es","page_count":2},"fr":{"hash":"fr_89c85beeef","wasm":"fr","page_count":10}}}

static/js/search_elasticlunr.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

static/js/search_tinysearch.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)