我有一组 html 文件,大部分是静态的,我想移动到我的 node.js/express/jade 项目。直接在 Jade 中包含 html 文件或片段的正确方法是什么?我不想将现有的 html 文件翻译成 Jade ?
最佳答案
您应该能够简单地 include
it在 Jade 模板内:
As mentioned
include
can be used to include other content such as html or css. By providing an extension, Jade will read that file in, apply any filter matching the file's extension, and insert that content into the output.
html
// ...
body
// ...
//- html files have no filter and are included verbatim
include content.html
关于node.js - 有没有办法直接在 Jade 中包含 html 文件或片段?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17903267/