Sign in

Custom css and JS per template

#3718
Bob

You can load your script/CSS for any post template by using the following condition:

{{#checkIf template '==' "MYTEMPLATE"}}    
<script defer src="{{js "your-scripts.js"}}"></script>
or 
<link rel="stylesheet" href="{{css "your-css.css" }}">
{{/checkIf}}

--
Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!