This guide discusses how you can use static assets (e.g. CSS, Javascript, or HTML files) on your pages.
This document discusses using static assets on your page at the code level. You can perform the same action intuitively with the help of the Insites Admin. Please visit our Assets documentation to learn more.
To follow the steps in this tutorial, review the required directory structure for your codebase, and understand the concepts of pages, layouts, and assets. You are extending code samples from the previous tutorials on this documentation:
The steps described in this article use Liquid filters. Please visit our documentation on Liquid filters to learn more.
Using static assets on your pages is a four-step process:
If you are starting from scratch (without creating the codebase), create an
If you have already created the codebase, you can skip this step and proceed to locate your
Create subdirectories for different assets inside the
Create a couple of assets.
Create a CSS file
Create a Javascript file
Create an HTML file
Use
To access assets, use the
Sync or deploy. The background colour of the page has changed to the colour specified in the
If you are syncing, you are only adding and changing files, and they will stay in the database even if you delete them on your computer as long as you do not deploy.
Congratulations! You have learned how to use static assets on your pages. Now you can learn about adding visuals to your pages using CSS or Javascript.
Didn't quite find what you are looking for or have feedback on how we can make the content better then we would love to hear from you. Please provide us feedback and we will get back to you shortly.