问题
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');
}
来源:https://stackoverflow.com/questions/44984368/add-static-assets-to-apostrophe-project-specifically-images-and-font-files