How do I add static assets to my Apostrophe project? The documentation only mentions pushing assets that are JavaScript or LESS files. It makes no mention of other static assets. In particular, I'd like to import a font face into my CSS, but there doesn't seem to be a way to include my OTF and TTF files.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You can add static assets such as fonts or images to the /public
directory which is automatically made available by the server. You can reference them from the root file path, such as
@font-face {
...
src: url('/fonts/myFont.otf');
}
标签:
apostrophe-cms