https://github.com/justcoded/dockerize-docsify-pdf
https://github.com/justcoded/dockerize-docsify-pdf
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/justcoded/dockerize-docsify-pdf
- Owner: justcoded
- Created: 2024-02-23T12:27:16.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-23T16:23:06.000Z (almost 2 years ago)
- Last Synced: 2025-03-24T13:21:23.287Z (10 months ago)
- Language: JavaScript
- Size: 128 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Docsify-pdf-export
## Install
```sh
npm install
```
## Using custom configuration:
Example `.docsifytopdfrc.js` content:
```js
module.exports = {
addResumeFor: ['docs', 'code-guides'], // split documentation file with `_sidebar.md`
pathToPublic: 'output/pdf', // path where pdf will stored
pathToPublicHtml: 'output/html', // path where html will stored
pathToDocsifyStyles: 'input/assets/css/docsify4-themes-vue.css', // path where docsify styles file is stored
pathToCustomStyles: 'styles.css', // path where docsify styles file is stored
removeTemp: true, // remove temporary generated .md and .html in `docs` folder or not
emulateMedia: 'screen', // mediaType, emulating by puppeteer for rendering pdf (reference: https://pptr.dev/api/puppeteer.page.emulatemediatype)
pathToDocsifyEntryPoint: 'input', // path where docsify `index.html` file is stored
pdfOptions: { // options for rendering pdf (reference: https://pptr.dev/api/puppeteer.pdfoptions)
format: 'A2',
margin: {
bottom: 120,
left: 0,
right: 0,
top: 70,
}
},
}
```
## Usage
Move files from your docsify folder to `input` and run:
```sh
node cli.js
```
This command will initiate the conversion process. Wait for the conversion to complete.
After the conversion process finishes, you will find two folders, `html` and `pdf`, generated in the `output` folder.
These folders will contain the converted files in their respective formats.