Questions tagged [harp]

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

Harp is a static web server with built-in preprocessing written in Node.js.

It serves Markdown, Jade, EJS, CoffeeScript, Sass, LESS, and Stylus as HTML, CSS and JavaScript without any configuration.

It also makes use of the Layout/Partial paradigm, available to Jade and EJS.

Truly dynamic content achievable by means of flexible custom metadata.

Your code can be easily compiled to HTML, CSS and JavaScript.

Harp can also be used as an embedded express middleware.

It also plays well with client side routers and frameworks.

63 questions
1
vote
0 answers

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 is for a Webshop. I googled a lot and found some…
rufreakde
  • 19
  • 4
1
vote
1 answer

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 404 page, I am greeted with a plain "Cannot GET…
legrojan
  • 569
  • 1
  • 9
  • 25
1
vote
3 answers

Jade Includes conditionals to check the actual page

Is there a way to check which page are you in Jade and include something (a partial page or a specific CSS Style) based in that page? For example: If I am in homepage, then include just the HOMEPAGE-head.jade Else - include the…
hailton
  • 591
  • 1
  • 3
  • 15
1
vote
2 answers

_data.json variables not being loaded

I've set up Harp, and it is running and serving content, but any values stored in _data.json seem to have no effect. Directory structure: / |-- _harp.json |-- _data.json |-- _layout.ejs |-- index.md |-- getting-started.md The file _harp.json…
LMS
  • 4,117
  • 5
  • 27
  • 37
0
votes
2 answers

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 it, receiving a single .json file. As the introduction docs…
nonNumericalFloat
  • 1,348
  • 2
  • 15
  • 32
0
votes
1 answer

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 properties on my geojson feature.properties called…
Skuffd
  • 334
  • 1
  • 4
  • 16
0
votes
1 answer

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 ? //Create the three.js cube const geometry = new…
0
votes
1 answer

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 messages. I've tried with different node.js versions.…
Dein
  • 19
  • 5
0
votes
1 answer

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 template. The code like this (different name but…
The Truth
  • 87
  • 11
0
votes
1 answer

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 layout does not render properly. Here is my layout…
Muhammad Ahsan
  • 608
  • 15
  • 28
0
votes
1 answer

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 not a Procfile (to my knowledge), so I changed the…
Seth Killian
  • 908
  • 9
  • 20
0
votes
2 answers

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 document (Jade is working perfectly, with no…
user5201343
0
votes
1 answer

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 harpjs to compile jade in to html templates, when I…
Atul Arvind
  • 16,054
  • 6
  • 50
  • 58
0
votes
1 answer

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 time (perhaps I am misunderstanding how harp works).
timothyylim
  • 1,399
  • 2
  • 14
  • 32
0
votes
1 answer

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": { "toc": true } } This works fine for handbook.md…
WoJ
  • 27,165
  • 48
  • 180
  • 345