Questions tagged [harp]

A static web server with built-in preprocessing. Written in node.js.

Filter by
Sorted by
Tagged with
2 votes
3 answers
680 views

HERE maps javascript API: How to apply styling from the style editor (.json)

TLDR: How to change the map style using .json output from the HERE maps editor? Therefore I created a "custom" style (using one of the presets) in the new HERE map style editor and exported ...
nonNumericalFloat's user avatar
0 votes
1 answer
193 views

How do I extrude a geojson polygon in harp Gl using purely Javascript?

we are experimenting with harp gl to replace a custom building tool for geojson. I want to visualize my polygons with the extruded polygon technique. Coming from MapBox GL I was able to have two ...
Skuffd's user avatar
  • 344
0 votes
1 answer
47 views

add a polygon to Harp using Lon,Lat

The Harp example below adds a polygon to a map using screen location and some "unknown" unit of measure. How do I add a polygon based on the lon/Lat of its shape, and its height in meter ? /...
user3519410's user avatar
-1 votes
1 answer
118 views

Starting Here.js Creating new MapView Get TypeError

I am trying to use harp.gl and used following tutorial. tutorial:https://developer.here.com/tutorials/harpgl/ But I am getting following errors. MapView.ts:919 Uncaught TypeError: Cannot read ...
ben siams's user avatar
2 votes
1 answer
494 views

Jade converts & to & when JavaScript is used

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-...
James Newton's user avatar
  • 6,673
0 votes
1 answer
624 views

Cannot install harp.js on Windows 10

I'm following some tutorials for webdevelopment, but I can't get harp.js installed on my Windows 10 pc, with node.js v11.10.0 Is it still possible to install harp.js, it fails with a lot of error ...
Dein's user avatar
  • 19
1 vote
0 answers
153 views

How do I solve the following harp errors on my project?

Please, I ran "harp version" command to get the Harp version on my system, but it prompted the following error on my PowerShell. PS C:> harp version harp : C:\Users\GACHIO\AppData\Roaming\npm\...
user7335708's user avatar
3 votes
0 answers
272 views

How to use Gitlab IDE's client side evaluation to live preview my Harp site?

I'm trying to make a Gitlab pages static site with Harp by following their example and I want to use Gitlab IDE's client side evaluation feature to be able to preview it as I write. It says I have to ...
Yajo's user avatar
  • 5,928
0 votes
1 answer
37 views

harp server hyphen doesn't work in jade

I am using Harp server and the hyphen (or at least I think that is this - character's name) causes an issue when trying to access metadata in my _data.json file. I am doing this inside a index.jade ...
The Truth's user avatar
1 vote
0 answers
29 views

Is it possible to call another parital to the harpe js parameter?

I'm harp js user and im curious if its possible to call another parital to the harp js parameter? I would like to proceed with modularization to reuse the code. It is difficult to use the parital ...
evan's user avatar
  • 23
0 votes
1 answer
720 views

Bootstrap 4: Layout does not render properly in browser

I have created basic static website project with harp.js. Project does compiles successfully with no errors and I have added required files and dependencies for bootstrap 4.Problem is my template ...
Muhammad Ahsan's user avatar
0 votes
1 answer
145 views

Running harp.js on AWS

I set up an Elastic Beanstalk instance on AWS based on node.js and I'm trying to get it to run harp.js. It worked fine on Heroku with this Procfile: web: harp server --port $PORT But on AWS, there's ...
Seth Killian's user avatar
2 votes
1 answer
280 views

`harp init` doesn't work

After installing harp by their tutorial I can't create default template from the second tutorial. On running harp init anyname I get fs.js:924 return binding.readdir(pathModule.toNamespacedPath(...
Vladyslav Zavalykhatko's user avatar
1 vote
0 answers
725 views

How do I solve these errors with npm install and sudo npm install -g harp?

I was trying to install Node.js, Grunt and Harp so I downloaded Node.js and then I wrote in the terminal this (note: I also had Homebrew): node -v npm update -g npm npm install -g grunt-cli After ...
Pier's user avatar
  • 103
-1 votes
2 answers
170 views

EJS selecting only a sepcific category

I have this piece of code. HTML: <header<% if ( current.source === 'features' || current.path[0] === 'index' || current.source !== 'customers' ) { %> class="header-white"<% } %>&...
Marcin Kordacki's user avatar
1 vote
1 answer
238 views

Use pug (jade) to selectively generate table of contents for articles in specified folders

I am using harp version 0.21.0 with jade support to develop a static site on Windows 7. The harp documentation links below show examples for using _layout.ejs for Nested Layouts and how to create a ...
SystemTheory's user avatar
1 vote
1 answer
284 views

Harp js + blog example: Is there a way to set default partial for articles?

I'm playing around with the Harp static site generator and there is this blog example around everywhere, see for instance: http://kennethormandy.com/journal/start-a-blog-with-harp I was asking if ...
chris h.'s user avatar
  • 265
0 votes
2 answers
314 views

harpjs not compiling stylus with harp server

harpjs won't compile stylus *.styl stylesheets when using harp server, harp server. This is the error I get when I try to use main.styl as a stylesheet, linking it with main.css within my index.jade ...
user avatar
0 votes
1 answer
1k views

use boolean operator in jade conditions

I want to use a boolean operator in my jade template to activate the menu. for that my syntax is like li(class={ active: "blogs" or "post" == type }) a(href='blog.html') | Blog I am using ...
Atul Arvind's user avatar
  • 16.3k
1 vote
0 answers
121 views

Harp is not serving js files from public directory

I am trying to compile my app on harp js. here is my directory structure. . ├── 404.html ├── _harp │ ├── 404.jade │ ├── _data.json │ ├── _harp.json │ ├── _layout.jade │ ├── index.jade │ ├─...
Atul Arvind's user avatar
  • 16.3k
1 vote
1 answer
117 views

How do I visit localhost:9000 in cloud9 for Harp server ( Custom workspace )?

I am trying run a harp server using harp server my-blog, it is served at localhost:9000. How do I visit that in Cloud9 ? I have tried all possible solutions available on the web like http://...
Diwakar Moturu's user avatar
-1 votes
1 answer
120 views

redirect a subfolder from heroku to dedicated WordPress hosting

I have a simple site on heroku using Harp (not married to harp, just used something that can serve up static HTML. We need to add a blog in a subfolder domain.com/blog instead of blog.domain.com for ...
mikebz's user avatar
  • 3,297
1 vote
1 answer
234 views

Generating a Table Of Contents with Harp

I'm trying to create a automatically generated table of contents in my documentation page. Basically I need to go through the documentation text, find the elements I'm interested in by name and add ...
AquaGeneral's user avatar
1 vote
1 answer
2k views

Using a relative image path in Harp Markdown

I'm putting together a site in Harp which will be composed of multiple topics, written by different contributors, potentially in different languages. My present folder structure is something like this:...
the evil lime's user avatar
2 votes
1 answer
253 views

Add class to current nav item

I have simple question about adding a class to the current menu item. I have the following page structure: - index.jade - about.jade - articles/ - _data.json - index.jade - blog-post-1.jade -...
user5898548's user avatar
0 votes
1 answer
60 views

How to quickly edit HTML using Harp

Currently, I am editing the layout and contents of my page on the fly using developer tools in chrome. Is there any way to do the same thing without having to recompile harp each and every single ...
timothyylim's user avatar
  • 1,447
1 vote
2 answers
275 views

Harp.js: generate a navigation for my site

Hi I's starting to develop a site using harp.js and was wondering if there is a way to build a automatic navigation for a site using the variables that are exposed to the templates. Something like ...
Christian Gill's user avatar
0 votes
1 answer
59 views

How to match metadata with a nested file?

My _layout.jade file (...) if toc div(id='toc', class="") (...) makes use of a variable set in _data.json: { "handbook": { "toc": true }, "incidents/incidents": { "...
WoJ's user avatar
  • 27.7k
0 votes
2 answers
236 views

Post-processing multiple HTML files: Copy <h1> contents to <title> tag

Suppose I have a number of compiled HTML-files from Harp, the static site generator. My question: How do I post-process multiple HTML files, in each, automatically copying the contents of < h1> ...
agibsen's user avatar
  • 877
1 vote
1 answer
377 views

include variable in partial include string in harp/ejs

I'm trying to build a dynamic string that will then include a partial. Essentially, I would like to do something like this: <%= partial("questions/<%= filename %>") %> but that isn't ...
victormejia's user avatar
  • 1,174
1 vote
0 answers
669 views

Jade - Nested for loop for navigation with sub-menu

I'm trying to use jade alongside harpjs to create a navigation menu with submenu items. The current json (located in public._data) looks like this: "navigation" : { "index": { "title": "Home", ...
Paul White's user avatar
1 vote
1 answer
202 views

How to automate Harp deployment?

I compile my website into static HTML using Harp. I then upload the static HTML to my webserver's data directory to deploy the build. I store the markdown source in a private GitLab repository (hosted ...
Superbest's user avatar
  • 25.7k
0 votes
2 answers
132 views

Harp server produces a lot of whitespace (in HTML)

I am running a blog on Harp. Everything works like a charm but one thing I can’t achieve (and don’t understand). The whole project uses EJS. The problem is in the produced source (HTML) there is a lot ...
Honza Hejzl's user avatar
2 votes
1 answer
831 views

Harp and browser-sync invoked by package.json with npm

I'd like to facilitate a way to start a harp.js server and run a browser-sync process at the same time. It's working like a charm on Linux. This is the content of my package.json { "scripts": { ...
warg's user avatar
  • 41
0 votes
1 answer
104 views

Is there a way to set css in harp when displaying markdown files?

Markdown without css is not very appealing to look at, and I would like to customize the visual display when viewing markdown files in harp. Is there any way to do this?
user2771609's user avatar
  • 1,877
0 votes
1 answer
731 views

Nodemailer on Node.js powered static site

I am rather desperate of a simple problem. I run a static site on Harp, Node powered static site server. On Harp’s docs there is a method of including externally served forms (via Woofoo). This could ...
Honza Hejzl's user avatar
2 votes
1 answer
382 views

HarpJS: layout asset paths in nested folders

In harpJS, say I have a folder structure like this: mysite/ - _layout.ejs - index.ejs + styles/ - main.css + folder-level-1/ - page-level-1.ejs + folder-level-2/ - ...
agibsen's user avatar
  • 877
0 votes
1 answer
135 views

How do I serve a Harp/nginx page from Docker?

I'm trying to run nginx and Harp in a Docker container to serve my blog. I've found this: https://github.com/octohost/harp-nginx When I run sudo docker pull octohost/harp-nginx, it downloads a bunch ...
Superbest's user avatar
  • 25.7k
0 votes
1 answer
676 views

Gulp build formatError - gulp + harpjs + gulp-gh-page + node

I'm working on a project based on : https://github.com/superhighfives/charliegleason.com Everything was working so great, and now i have a problem when i try to build the project using gulp build ......
Quentin Voiriot's user avatar
1 vote
1 answer
123 views

How do I password protect a subdirectory of a Harp.js app

How do I password protect a subdirectory in a Harp site (running under Node)? I want something like basic auth but for a single folder, not the whole site.
KemanoThief's user avatar
3 votes
1 answer
109 views

How to write conditional jade when there is two different design for a layout?

I am building a website on harp.js. I have a layout.jade file which includes _header.jade which is written like != partial("_header") != yield != partial("_footer") Now, there is a change ...
shumana chowdhury's user avatar
2 votes
1 answer
204 views

Is there a way to concatenate JS and CoffeeScript files using Harp server?

I would like to request /js/app.js from HarpJS server and have it preprocess a folder of coffeescript and javascript. For example, say I have: /js/module/a.js /js/module/b.coffee /js/module/c.coffee /...
thesmart's user avatar
  • 3,003
1 vote
2 answers
277 views

In "for article, slug in public.articles._data" what is "slug"? Is there a way to use nesting arrays?

I experiment with HarpJS, a NodeJS static blog generator. In tutorials there is such example for metadata: for article, slug in public.articles._data a(href="/articles/#{ slug }") h2= article....
Georgy's user avatar
  • 2,420
0 votes
1 answer
110 views

Less 2.5 modifyVars() seems not work with Harp.js v0.15.2

I'm writing a Bootstrap 3 theme using Harp.js / jade / less When I try to dynamically change the background color using less.modifyVar() function, the stylesheet is correctly reloaded but nothing ...
ceadreak's user avatar
  • 1,662
15 votes
1 answer
884 views

How to include bower components in harp

I've got a project in Harp with this standard directory structure: (highlighted parts are in my git, bower_components and www should be created upon install/compile). When I install a new bower ...
georg's user avatar
  • 212k
0 votes
1 answer
477 views

lib-sass breaking harp on heroku

Interesting problem, Using harp to build a simple app, then deploying it to Heroku, which is proving to be an issue. The last deploy worked flawlessly using the Harp buildpack, But now it's breaking ...
pj100's user avatar
  • 402
0 votes
1 answer
478 views

Harp Server, Jade and JSON Loop, Error: Cannot read property "length" of undefined

This is the nav.jade file each link in data h5.home-link: a(href="#{ url }") This is my data.json file { "links": [ { "url": "index.html", "pg-title": "Home" }, { "url": "...
invinciblemuffi's user avatar
1 vote
0 answers
534 views

Create sites out of JSON data with Hexo or Harp and EJS

my problem in short: I am new to this static site things and have to use one of those two static site generators. I try to load data from JSON files and create sites on the server from that data. This ...
rufreakde's user avatar
1 vote
1 answer
176 views

How to render 404 pages with harp as library

I am using harp as an Express middleware to render my static files, which I write as jade/coffee/stylus. Everything works fine, except when I browse a page that does not exist. Instead of the usual ...
legrojan's user avatar
  • 579
0 votes
1 answer
105 views

How to custom ejs delimeters in harpjs?

harp js seems to be a very useful tool to me. they suppor ejs compile,but, I didn't find how to get the ejs custom delimiters function support. I want to replace <% %> with new tokens such as ...
H2Ojile's user avatar
  • 37