Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
西特雷普:
我想做的事 :
有没有这方面的预处理器?有没有比#include 更好的方法?
如果您想直接将该 CSS 或 JS 的内容插入到您的 HTML 输出中,那么#include-ing 它没有任何问题。FreeMarker 不在乎那是什么类型的文件:扩展名可以保留.cssor .js,您可以使用它来防止意外解释为 FTL(当然您在 a or中<#include ... parse=false>没有${...}-s 等)。.js.css
#include
.css
.js
<#include ... parse=false>
${...}