Use url filter for script file links

This commit is contained in:
Helen Chong 2024-06-18 16:36:08 +08:00
parent 0107203126
commit 7275dd84cd
1 changed files with 6 additions and 1 deletions

View File

@ -31,7 +31,12 @@
{% block favicon %}{% include "global/favicon.njk" %}{% endblock %}
{# JavaScript #}
<script src="/assets/js/details-utils.js" defer></script>
<script src="{{'/assets/js/details-utils.js'}}" defer></script>
{% if customJSFiles %}
{%- for jsFile in customJSFiles -%}
<script src="{{'/assets/js/' + jsFile + '.js' | url | safe}}" defer></script>
{%- endfor -%}
{% endif %}
<title>
{% block pageTitle %}{{ title + " | " if title }}{{ sitemeta.siteName | safe }}{% endblock %}