Skip to content

Commit

Permalink
Fix Path Error for pagefind in package_abridge.js (#209)
Browse files Browse the repository at this point in the history
* fix(build): correct path for pagefind file operations

Adjust file paths in package_abridge.js

* fix: auto creates the `static/js` directory.
  • Loading branch information
IvanLi-CN authored Oct 6, 2024
1 parent e326d6b commit cd29bda
Show file tree
Hide file tree
Showing 16 changed files with 114 additions and 109 deletions.
4 changes: 2 additions & 2 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ taxonomies = [

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

search_library = "elasticlunr"
search_library = "pagefind"
stylesheets = ["abridge.css"]

webmanifest = "manifest.min.json" # Required for PWAs
Expand Down
198 changes: 100 additions & 98 deletions package_abridge.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/_headers
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Referrer-Policy: strict-origin-when-cross-origin
Strict-Transport-Security: max-age=63072000; includeSubdomains
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=()
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;
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;

/*.js
Cache-Control: public, max-age=604800, must-revalidate
Expand Down
3 changes: 2 additions & 1 deletion static/js/abridge.min.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion static/js/abridge_nopwa.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/js/abridge_nosearch.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion static/js/abridge_nosearch_nopwa.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions static/js/pagefind-entry-1728241819.json
Original file line number Diff line number Diff line change
@@ -0,0 +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}}}
2 changes: 1 addition & 1 deletion static/js/search_elasticlunr.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/js/search_tinysearch.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added static/js/wasm.en.pagefind
Binary file not shown.
Binary file added static/js/wasm.es.pagefind
Binary file not shown.
Binary file added static/js/wasm.fr.pagefind
Binary file not shown.
Binary file added static/js/wasm.unknown.pagefind
Binary file not shown.
Loading

0 comments on commit cd29bda

Please sign in to comment.