You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
or "docsifytopdf" field in package.json (like rcfile can receive) with this setup object:
Example .docsifytopdfrc.js content:
module.exports={contents: ["docs/_sidebar.md"],// array of "table of contents" files pathpathToPublic: "pdf/readme.pdf",// path where pdf will storedpdfOptions: "<options for puppeteer.pdf()>",// reference: https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagepdfoptionsremoveTemp: true,// remove generated .md and .html or notemulateMedia: "screen",// mediaType, emulating by puppeteer for rendering pdf, 'print' by default (reference: https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pageemulatemediamediatype)}
🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧
This part of module is not safe for work - it will stop process after generation pdf. Use it for your own risk.
You can just import and use main function like this:
constconverter=require('docsify-pdf-converter');constconfig=require('./.docsifytopdfrc.js');converter(config)// right after resolve or reject inner promise your process will be terminated :C
🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧🚧
Contributing
Fork it!
Create your feature branch: git checkout -b my-new-feature
Commit your changes: git commit -am 'Add some feature'
Push to the branch: git push origin my-new-feature
Submit a pull request
Your pull requests and issues are welcome!
About
A tool for building pdf based on your docsify project