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.
如何将静态资产添加到我的 Apostrophe 项目?该文档仅提及推送 JavaScript 或 LESS 文件的资产。它没有提及其他静态资产。特别是,我想将字体导入到我的 CSS 中,但似乎没有办法包含我的 OTF 和 TTF 文件。
您可以将字体或图像等静态资产添加到/public服务器自动提供的目录中。您可以从根文件路径中引用它们,例如
/public
@font-face { ... src: url('/fonts/myFont.otf'); }