Using Assets
Coal allows static files to be used.
Loading Static Assets In Coal
For local development and building projects, Coal supports static assets. Just create a folder within your
source called assets
and reference files from it with a /
prefix.
Assuming we have a file called favicon.png
inside {src}/assets/images
, we can use it
like so:
<link rel="icon" type="image/png" href="/rust-coal/assets/images/favicon.png" />
Building Coal Projects With Assets
The entire assets
folder will be copied over into your compiled Coal project when running the build process.