Hi, I'm writing a new comment system for Nikola and I'd like to access a
specific Javascript file from the ``comment_form()`` template.
The approach I take is to drop the JS file in ``files/assets/js``, then
add a new ``templates/comments_helper.tmpl``. Its ``comment_form()``
looks like this:
<%def name="comment_form(url, title, identifier)">
%if ...:
<div ...></div>
<script src="${url_replacer('link://post_path/', '/assets/js/foobar.js')}"></script>
%endif
</%def>
Generating the site seems to produce correct (relative) links. I'd like
to ask if this usage of ``url_replacer()`` is correct or if there is a
more appropriate way for referencing such language-independent files.
Thanks!
--
Ivan Vilata i Balaguer --
https://elvil.net/