Convert docsify projects into pdf.
npm install docsify-to-pdf``sh`
npm install --save-dev docsify-to-pdf
Create:
* config file .docsifytopdfrc."docsifytopdf"
* or field in package.json (like [rcfile][rcfile] can receive) with this setup object:
Example .docsifytopdfrc.js content:
`js`
module.exports = {
contents: [ "docs/_sidebar.md" ], // array of "table of contents" files path
pathToPublic: "pdf/readme.pdf", // path where pdf will stored
pdfOptions: "
removeTemp: true, // remove generated .md and .html or not
emulateMedia: "screen", // mediaType, emulating by puppeteer for rendering pdf, 'print' by default (reference: https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pageemulatemediamediatype)
}
Add script into package.json:
`json`
{
"scripts": {
"convert": "node_modules/.bin/docsify-to-pdf"
}
}
Run converter:
`sh`
npm run convert
- Fork it!
- Create your feature branch: git checkout -b my-new-featuregit commit -am 'Add some feature'
- Commit your changes: git push origin my-new-feature`
- Push to the branch:
- Submit a pull request
Your pull requests and issues are welcome!
[rcfile]: https://www.npmjs.com/package/rcfile
Base on docsify-to-pdf