Stacklane includes native support for
If you have a SCSS file at
/theme.scss, then reference this
in your HTML or Mustache file as you would any CSS file:
<link rel="stylesheet" href="/theme.scss" ... >
We recommend using SCSS over plain CSS as it inherently supports combining many files into one, as well as minification.
If the SCSS file is a private file, then it will be inlined into the HTML.
If you do not need the extra capabilities of Mustache
templates, then a plain HTML file may be used. It follows the same routing conventions
and CSP requirements as Mustache files,
index.html into a route with a
trailing slash. Therefore if you decide to rename your file extension to use Mustache
in the future, there is no change to the public endpoint/URL.
You can include a
however in general we recommend SASS/SCSS (
due to the additional capabilities offered.
There are performance benefits to SCSS in addition to its functionality --
SCSS inherently supports combining many files into one, as well
We like to think of third party JS libraries as part of the browser's stack -- something that extends the native functionality of the browser, and that your app can put to use. We generally do not recommend hosting these along with your other Stacklane files, as it brings no benefit. There are many excellent content delivery networks these days, where third party libraries are dependable, static, and versioned. jsDelivr is one such service, which supports combining several files, among other features.
Inline in the normal way using
Alternatively you may inline a private file by
referencing it like any external script:
Because of the underscore marking it as a private file,
Stacklane inlines the JS into the page.
In either case Stacklane produces an appropriate CSP.