Introduction
This is a PDF generator from docusaurus document.
*Note
- This plugin is not intended to be used during build process.
Demo
This is generated PDF of official docusaurus website:
https://drive.google.com/file/d/19P3qSwLLUHYigrxH3QXIMXmRpTFi4pKB/view
Usage
1. Start your docusaurus project
yarn start
2. Open new terminal windows
npx docusaurus-pdf <initialDocsUrl> [filename] [baseUrl]
For example
npx docusaurus-pdf http://localhost:3000/myurl/docs/doc1 hoge.pdf myurl
*NOTE!
initialDocsUrl
is required.filename
is optional (default is docusaurus.pdf
).baseUrl
is the baseUrl setting from docusaurus.config.js.
It is optional (default is empty string).
You must specify a filename to use a custom baseUrl.
Link of PDF
- Move generated pdf file to
static/img
folder. <a>
tag with target="_blank"
<a href={useBaseUrl('img/docusaurus.pdf')} target="_blank">
Download PDF
</a>
NOTE!
- If this plugin cannot find next page link, PDF generation will stop.
- Dark theme PDF cannot be generated correctly now.