【发布时间】:2016-11-12 01:51:02
【问题描述】:
他们是一种在编译时内联并使用jade/pug模板在带有文本的标签内包含外部文档的方法吗?
例如,类似:
p paragraph text content with #[span.icon @include path_to_file/icon.svg] inline svg thrown into the html document
但不是这个解决方案:
p paragraph text content with #[span.icon #[svg #[use(href='path_to_file/icon.svg')]]]
我知道后面的作品,但我正在寻找不使用 use 标签或外部引用的解决方案
解决方案需要在编译时在单词之间的标签内导入文档。
我已经多次查看 pug 文档。只有接近此的事情是标签插值和块扩展,但它们似乎并没有专门考虑这种情况。
谢谢!
【问题讨论】:
标签: html templates include pug