xm-md-pdf
Version:
CLI tool for converting Markdown files to PDF and DOC.
36 lines (35 loc) • 943 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.defaultConfig = void 0;
const path_1 = require("path");
exports.defaultConfig = {
page_export_template: 'https://www.baidu.com/',
basedir: process.cwd(),
stylesheet: [
path_1.resolve(__dirname, '..', '..', 'markdown.css')
],
css: '',
body_class: [],
highlight_style: 'github',
// markdown 转 html 的配置参数
marked_options: {},
// html 转 pdf的配置参数
pdf_options: {
printBackground: false,
format: 'A4',
margin: {
top: '20mm',
right: '10mm',
bottom: '20mm',
left: '10mm',
},
},
// puppeteer 启动浏览器的参数
launch_options: {},
// md 转 html 的编码
md_file_encoding: 'utf-8',
// style 文件编码
stylesheet_encoding: 'utf-8',
as_html: false,
devtools: false,
};