Skip to content

Resources

haskelt edited this page May 10, 2021 · 10 revisions

In almost all cases your site will consist of more than just HTML files. Maybe you have some CSS style files, some JavaScript files, and some SVG icons. In cases where these files are specific to a particular page on your site, it may be best to treat them as content, and put them in the appropriate content directory alongside your XML source file (see Non HTML content). But if you want them available to all the pages on your site, you can create a design/resources directory. Files and directories in this location will get copied into the root directory of your site. For example, if you create a directory design/resources/css and put style files in it, those style files will be in a directory css on your site. For example, if you created a file design/resources/css/style.css, you could then load that style sheet via a page template like this:

<!doctype html>

<title>{{this.title}}</title> {{ this.content }}

Note that Salal will replace any references to Global variables in CSS, JavaScript, and Python files as it copies them over to the build directory.

Clone this wiki locally