Sign in

Custom css and JS per template

Avatar photoBob

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>
    <link rel="stylesheet" href="{{css "your-css.css" }}">

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!