GithubHelp home page GithubHelp logo

pixelshub / docsify-to-pdf Goto Github PK

View Code? Open in Web Editor NEW

This project forked from engaugusto/docsify-to-pdf

0.0 0.0 0.0 11 KB

A "copy" from https://github.com/meff34/docsify-to-pdf-converter but adjusted to work with images and pdf.

License: MIT License

JavaScript 100.00%

docsify-to-pdf's Introduction

docsify-to-pdf

Install

npm install --save-dev docsify-to-pdf

Usage as CLI:

Create:

  • config file .docsifytopdfrc.<js|json|yaml>
  • 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 path
  pathToPublic: "pdf/readme.pdf", // path where pdf will stored
  pdfOptions: "<options for puppeteer.pdf()>", // reference: https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagepdfoptions
  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:

{
  "scripts": {
    "convert": "node_modules/.bin/docsify-to-pdf"
  }
}

Run converter:

npm run convert

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!

Base on docsify-to-pdf

docsify-to-pdf's People

Contributors

engaugusto avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.