Export the whole docs to PDF
hsluoyz opened this issue · comments
We can find a way to export a Docusaurus v2 site into PDF, so it can be used as the manual for the project.
Docusaurus doesn't support this out of the box. There are various options to do this:
Docusaurus doesn't support this out of the box. There are various options to do this:
They seem to not support Docusaurus v2. How about kohheepeace/mr-pdf#50 (comment) or https://github.com/kohheepeace/mr-pdf#docusaurus-v2-beta?
updated:
It works not well for Docusaurus 2.0.0-rc1 :(
https://github.com/casbin/casbin-website-v2/blob/master/package.json#L20
Only part of the documents is captured.
Test command:
npx mr-pdf --initialDocURLs="https://casbin.io/docs/overview" --contentSelector="article" --paginationSelector=".pagination-nav__item--next > a" --excludeSelectors=".margin-vert--xl a" --coverImage="https://docusaurus.io/img/docusaurus.png" --coverTitle="Docusaurus v2"
Docusaurus doesn't support this out of the box. There are various options to do this:
They seem to not support Docusaurus v2. How about kohheepeace/mr-pdf#50 (comment) or https://github.com/kohheepeace/mr-pdf#docusaurus-v2-beta?
updated: It works not well for Docusaurus 2.0.0-rc1 :( https://github.com/casbin/casbin-website-v2/blob/master/package.json#L20 Only part of the documents is captured.
Test command:
npx mr-pdf --initialDocURLs="https://casbin.io/docs/overview" --contentSelector="article" --paginationSelector=".pagination-nav__item--next > a" --excludeSelectors=".margin-vert--xl a" --coverImage="https://docusaurus.io/img/docusaurus.png" --coverTitle="Docusaurus v2"
I have tried docusaurus-prince-pdf
result: https://github.com/Selflocking/casbin-website-v2/releases/tag/pdf
It better than mr-pdf.
But I'm having trouble with Tabs,
It seems impossible to switch between tabs in pdf
@Selflocking we can ignore the tabs for now, that's OK. I tried your generated PDF, the zh docs has issues like:
Can you fix it?
@Selflocking we can ignore the tabs for now, that's OK. I tried your generated PDF, the zh docs has issues like:
Can you fix it?
I am trying to fix it