diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2025-01-18 14:09:58 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2025-01-18 14:09:58 -0300 |
commit | 25e3c1ff82b4bfe24158de3aaf5e6b34df46c55d (patch) | |
tree | d26f75f0cdfb2dae56f70064a1b0462d2a7c9588 | |
parent | c9180b4af8bee564742dffcb9773cb8632049170 (diff) | |
download | bookup-25e3c1ff82b4bfe24158de3aaf5e6b34df46c55d.tar.gz bookup-25e3c1ff82b4bfe24158de3aaf5e6b34df46c55d.tar.bz2 |
-rw-r--r-- | ChangeLog.md | 6 | ||||
-rw-r--r-- | Makefile.bookup | 13 | ||||
-rw-r--r-- | TODO.md | 3 |
3 files changed, 18 insertions, 4 deletions
diff --git a/ChangeLog.md b/ChangeLog.md index b72c275..f6e4fc5 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,5 +1,11 @@ # ChangeLog +## v0.2.5 - 2025-01-18 + +* [x] Fix lookup for `js` folder for notes when the book is built under + `build/book` (then search won't work because `build/book/js` won't be + available). + ## v0.2.4 - 2024-10-06 * [x] Apply the previous `NULL` fix to the portuguese template. diff --git a/Makefile.bookup b/Makefile.bookup index 079b93d..95e32a9 100644 --- a/Makefile.bookup +++ b/Makefile.bookup @@ -227,7 +227,18 @@ bookdown_notes_html: # Replace fuse.js from CDN to local # This ensures the HTML output can be browsed offline - @find notebook -name *.html -exec sed -i -e 's|https://cdn.jsdelivr.net/npm/fuse.js@[^"]*|../js/fuse.min.js|' {} \; + # + # We could simply assume that there's a ../js/fuse.min.js, but that may not + # be always the case. + # + # Instead, we ship it's own js/ folder, making notes self-contained. + # + # Another approach would be to have a common, parent js/ folder for both the + # book and the notes, to minimize loading external resources. + @#find notebook -name *.html -exec sed -i -e 's|https://cdn.jsdelivr.net/npm/fuse.js@[^"]*|../js/fuse.min.js|' {} \; + @mkdir notebook/js + @cp vendor/bookup/vendor/Fuse.js/dist/fuse.min.js notebook/js + @find notebook -name *.html -exec sed -i -e 's|https://cdn.jsdelivr.net/npm/fuse.js@[^"]*|js/fuse.min.js|' {} \; notes: compile_notes bookdown_clean bookdown_notes_html move_notes clean @@ -2,9 +2,6 @@ ## Issues -* [ ] Fix lookup for `js` folder on nested books and notes. - If the book is built under `build/book`, then search - won't work because `build/book/js` won't be available. * [ ] Bug in `pandoc` with `citeproc` ignoring citation inside LaTeX blocks. Affecting the PDF format. Test available at `test/pandoc`. Consider to test with the latest pandoc and citeproc versions. |