This plugin requires VuePress >= 1.0.0-alpha.44.
- Merge all of your pages automatically.
- Support default and confurable front cover.
- Inject Table of Contents.
- Inject Page Numbers.
- Generate different PDF files per locale.
- Transform all of links.
npm i vuepress-plugin-exportUsing this plugin:
// .vuepress/config.js
module.exports = {
  plugins: ['vuepress-plugin-export']
}Then run:
vuepress export [path/to/your/docs]You can configure this plugin to export multiple files. Add config options:
module.exports: ['vuepress-plugin-export', {
  theme: '@vuepress/default',
  puppeteer: { args: ['--no-sandbox'] },
  bundles: [{
    filter: (location) => !location.includes('export'),
    dest: () => 'docs/public/export.pdf',
  }, {
    filter: /\/en\///,
    dest: (siteConfig) => `docs/public/${siteConfig.title}.en.pdf`,
  }]
}]Then run:
vuepress export [path/to/your/docs]- theme: String
- puppeteer: Object
- bundles: Array | Function(Array[PageConfig]) => Array[bundle]
- bundles[].filter: RegExp | Function(location: string, page: PageConfig) => boolean
- bundles[].dest: (config: VuepressPluginConfig(https://vuepress.vuejs.org/config/#basic-config)) => string
- bundles[].sorter: Function(PageConfig, PageConfig) => -1, 0, 1
with PageConfig:
url: string
location: string
title: string
path: string
git clone https://github.com/ulivz/vuepress-plugin-export
cd vuepress-plugin-export
yarn
yarn exportNote that this package is powered by puppeteer, if you are in a mysterious wall, consider setting environment variables before installation.
PUPPETEER_DOWNLOAD_HOST=https://npm.taobao.org/mirrorsNote that this pavkage is powered by easy-pdf-merge, Java 6 or higher must be present.
- 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 :D
vuepress-plugin-export © ULVIZ, Released under the MIT License.
Authored and maintained by ULVIZ with help from contributors (list).
github.com/ulivz · GitHub @ULVIZ · Twitter @_ulivz