Closed CameronGray1210 closed 1 year ago
cc @Genne23v, @denke8.
We also updated a bunch of dependencies. Can you two do some investigation? We need to unbreak this soon, or roll back whatever broke it.
I tested both old and updated script. Both creates the same pdf content which is empty. I remember created pdf had contents when I was working on #174 last week.
@CameronGray1210, @humphd Do we have a specific version (i.e., git commit hash) that is known to be working?
edit: I can confirm that d58820163b2249635b3cf45a52dd9c2d40fddf62
does work
@dadolhay this is what git bisect
is for, see https://blog.humphd.org/learning-to-git-bisect/
I can also confirm that upgrading the following libraries:
"@docusaurus/core": "2.2.0",
"@docusaurus/plugin-ideal-image": "^2.2.0",
"@docusaurus/plugin-pwa": "^2.2.0",
"@docusaurus/preset-classic": "2.2.0",
from 2.0.0-beta9
to 2.2.0
do indeed cause the issue, actually 2 of them:
--paginationSelector="a.pagination-nav__link--next"
mr-pdf
(and the underlying puppeteer
?) can no longer read the dev site (maybe the js build target has changed?) ...tried the latest mr-pdf
version also, it does not help.However, as a workaround, if we do a build
and serve
(causing static site to be built and served instead) mr-pdf seems to start working again correctly.
@CameronGray1210, @humphd, @Genne23v Do you agree with this change?
I wonder if we should explore other options. For example, https://github.com/signcl/docusaurus-prince-pdf seems to be updated more recently. If we can get mr-pdf
to work with your 2.2.0
setup, great. If not, let's try something new.
@dadolhay are you willing to work on this?
@humphd
I did make mr-pdf work with the static served content locally, I should be able to integrate it into the build script I'd expect. On the other hand, if you prefer, I could also explore prince-pdf too. (It may or may not work, I have no experience with it).
Which direction would you prefer?
I would say if you can get what we have now working again, start there. If we want to try switching to a new approach later, that should be a follow-up.
@humphd
Upon further inspection I can see that the generation script already runs against the static site, so the development changes of docusaurus should not make any difference.
I created a small PR, that updates the selector mentioned above. The changes did work on local testing.
The PDF file generation is creating only the TOC (table of contents) with links to localhost on port 3000 :(
Could this be due to #174?