CSS

Get the URL to a stylesheet file in your theme.


Example

{{ theme:css src="style" }}
/site/themes/redwood/css/style.css

If you leave off the src parameter, the tag will use the theme name as the filename.

{{ theme:css }}
/site/themes/redwood/css/redwood.css

Add the tag parameter to output a link tag.

{{ theme:css src="style" tag="true" }}
<link rel="stylesheet" href="/site/themes/redwood/css/style.css" />

Parameters

src

string theme name

The path to the css file, relative to the css directory. You can leave off the extension, we know it's a .css file.

tag

boolean false

Enable this to output the full HTML tag.

version

boolean false

If you are using Elixir to manage your theme assets, setting this to true will use the manifest to output the filename.

cache_bust

boolean false

Setting this to true will add the timestamp of the asset to the end of the URL in a ?v= query param. Use this to version files if you are not using Elixir.

absolute

boolean false

Render the URL in an absolute format.

Last modified on August 22, 2017