Architecture
Assets
Assets consist all your themes static files including stylesheets, JavaScript, Images and other static files which can be referenced anywhere inside your theme HTML files.
All asset files/folders must be placed inside the assets folder in your theme directory in order to be accessible in public by the theme and for external use cases.
Location
.
└── theme
├── assets
| ├── main.css
| ├── main.js
| ├── favicon.png
| ├── plugins
| | ├── livechat-plugins.js
├── ...
├── layouts
...
Usage
To access and reference an asset file from the assets folder, Taojaa theme engine has provided an {{asset_url}}
helper function which is to locate the asset directory and adding the path to the asset file you want to reference.
<!DOCTYPE html>
<html>
<head>
...
<link rel="shortcut icon" href="{{asset_url}}/favicon.png">
<link rel="stylesheet" href="{{asset_url}}/main.css" />
...
</head>
<body>
...
<script type="text/javascript" src="{{asset_url}}/main.js" />
</body>
</html>