Download

{{asset}} helper

{{asset}} is a helper used to retrieve asset URLs

Syntax:

{{ asset "PATH_TO_ASSET" }}

Example:

{{ asset "css/main.css" }}

It returns URL concatenated by the following way:

DOMAIN + ASSETS_PATH + PATH_TO_ASSET

Where DOMAIN is a domain specified under server settings. ASSETS_PATH is a value from theme config under files.assetsPath, and PATH_TO_ASSET is a param value.

What are you waiting for?

Start building your site today.

  1. 1 Download Publii
  2. 2 Write your content
  3. 3 Publish your site
Create website