Vuepress plugin for exporting site as PDF
theme
- theme name (default @vuepress/default
)sorter
- function for changing pages order (default false
)outputFileName
- name of output file (default site.pdf
)puppeteerLaunchOptions
- Puppeteer launch options object (default {}
)pageOptions
- Puppeteer page formatting options object (default {format: 'A4'}
)Using this plugin:
// in .vuepress/config.js
module.exports = {
plugins: ['@snowdog/vuepress-plugin-pdf-export']
}
Then run:
vuepress export [path/to/your/docs]
To run this plugin on Gitlab CI you may want to run Chrome with no-sandbox
flag. Details
module.exports = {
plugins: [
['@snowdog/vuepress-plugin-pdf-export', {
puppeteerLaunchOptions: {
args: ['--no-sandbox', '--disable-setuid-sandbox']
}
}]
]
}