harp

Jade converts & to & when JavaScript is used

£可爱£侵袭症+ 提交于 2020-06-28 08:14:18
问题 I've just started using Harp 0.30.1 which comes with Jade installed as a pre-processor. So I'm just starting with Jade, too. I have a folder containing a set of files with filenames like This-is-an-MD-file.md . With the index.jade file in this folder, I want to produce the following HTML output: <ul> <li><a href="This-is-an-MD-file.html">This is an MD file</a></li> </ul> I have understood enough about Jade and mixins to produce this... - var trim = function(string) { - var index = string

Call javascript functions on another file from an EJS templates in Harp.js

若如初见. 提交于 2019-12-22 08:38:02
问题 Trying to make a website with Harp.js here. I use ejs templates, and want to store some useful javascript functions in a central file. How do I do that? I tried to use <% include _render_util.js %> But it does not work (seems like js file is not parsed). Any ideas? Thanks! 回答1: Although there are ways of making this work (sometimes), it's not something that was deliveratly built into Harp.js. Forcing this behaviour often takes time to debug and causes unexpected issues. Here is a quick

Call javascript functions on another file from an EJS templates in Harp.js

孤人 提交于 2019-12-05 14:03:48
Trying to make a website with Harp.js here. I use ejs templates, and want to store some useful javascript functions in a central file. How do I do that? I tried to use <% include _render_util.js %> But it does not work (seems like js file is not parsed). Any ideas? Thanks! Although there are ways of making this work (sometimes), it's not something that was deliveratly built into Harp.js. Forcing this behaviour often takes time to debug and causes unexpected issues. Here is a quick experiment I made that works (I didn't throughly test it): helpers.ejs I created a say_hello function that takes a

LESS: Unrecognized input error when using Bootstrap

不打扰是莪最后的温柔 提交于 2019-11-26 21:01:36
After upgrading Harp, I started getting an Unrecognized Input error in an irrelevant line of CSS. Less -> CSS (Unrecognised input) /Users/jorge/Dropbox/harp.io/apps/mysite.com/public/css/main.less Using Bootstrap v2.2.2 and Harp v0.9.4. After digging for a while, I found that the error was coming from the mixin.less file where the #grid stuff was getting defined. This is what the file had originally: (~".span@{index}") { .span(@index); } After reading the LESS change log , I found that they changed the syntax so you can now use variables directly without needing the ~ hack. So I changed my

LESS: Unrecognized input error when using Bootstrap

删除回忆录丶 提交于 2019-11-26 07:47:17
问题 After upgrading Harp, I started getting an Unrecognized Input error in an irrelevant line of CSS. Less -> CSS (Unrecognised input) /Users/jorge/Dropbox/harp.io/apps/mysite.com/public/css/main.less Using Bootstrap v2.2.2 and Harp v0.9.4. 回答1: After digging for a while, I found that the error was coming from the mixin.less file where the #grid stuff was getting defined. This is what the file had originally: (~".span@{index}") { .span(@index); } After reading the LESS change log, I found that