Although there are ways to make this work (sometimes), this is not what was built into Harp.js. This often takes time to debug and unforeseen problems.
Here is a quick experiment that I did that worked (I did not test it):
helpers.ejs
say_hello, Hello, {name}.
<%
say_hello = function (name) {
return 'Hello, ' + name;
}
%>
index.ejs
I include helpers.ejs (, ) , . <h1>Hello, beautiful</h1>.
<% include helpers.ejs %>
<h1><%= say_hello("beautiful") %></h1>
: https://gist.github.com/jorgepedret/816c2b3985ad12cef022
GitHub , https://github.com/sintaxi/harp/issues/272
, . , .