Closed ghost closed 11 years ago
You're almost there. For the call to stylesheet
you don't want to include the output, so you'll do <% stylesheet('abc.css') %>
(without the -
before stylesheet
).
Let me know if that doesn't work?
@RandomEtc It works. Thanks. I am new to ejs and I should read more about it. :)
Great - closing this issue.
The main thing to know is that you almost always want <%=variable %>
which will safely HTML-escape your data. If you do <%-variable%>
this is only safe if the data is already escaped. And without the =
or -
then you're just calling a function or running javascript: there's no output into your markup.
Hope that helps!
I want to define some common css files in the layout with
stylesheet
for short. But the following codegenerates:
Is that mean I should write
in the layout instead of using
stylesheet
? Thanks.