【发布时间】:2017-02-26 11:42:09
【问题描述】:
我正在使用 pug 输出 html,我将其用于以后使用 html-pdf 生成 pdf。
我的控制器:
// read file
var source = fs.readFileSync(path.resolve(__dirname, 'templates/pdf.pug'), 'utf-8');
// compile pug template and output html
var template = pug.compile(source);
var html = template(data)
我的模板
doctype html
html
head
title Merapi Export
link(rel='stylesheet', href='/node_modules/bootstrap/dist/css/bootstrap.min.css')
body
h1 Merapi Export
有没有办法直接从节点模块集成引导程序?
【问题讨论】:
标签: node.js twitter-bootstrap pug