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

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 :…
1
vote
0 answers

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 function of harp to insert data into a module of a…
evan
  • 23
  • 4
1
vote
0 answers

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 that I installed Bootstrap files and I wrote (always…
Pier
  • 103
  • 1
  • 11
1
vote
1 answer

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 list of blog…
SystemTheory
  • 339
  • 3
  • 15
1
vote
1 answer

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 there is a way to set a default jade template/partial…
chris h.
  • 265
  • 1
  • 4
  • 18
1
vote
0 answers

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 │ ├── main.less │ └── public │ ├── css │ …
Atul Arvind
  • 16,054
  • 6
  • 50
  • 58
1
vote
1 answer

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…
Diwakar Moturu
  • 652
  • 5
  • 13
1
vote
1 answer

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 those to the table of contents accordingly. It…
AquaGeneral
  • 155
  • 1
  • 19
1
vote
1 answer

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: +public |_layout.jade +en +topic 1 …
1
vote
2 answers

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 this: for url in public._contents li= url I…
Christian Gill
  • 514
  • 5
  • 21
1
vote
1 answer

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 working. Any tips on how do to this?
victormejia
  • 1,174
  • 3
  • 12
  • 30
1
vote
0 answers

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", "slug": "index.html", "subitems":{} }, …
Paul White
  • 11
  • 1
1
vote
1 answer

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 by me). All the uploading and mucking about with…
Superbest
  • 25,318
  • 14
  • 62
  • 134
1
vote
1 answer

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
  • 617
  • 8
  • 23
1
vote
2 answers

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.title and _data.json file: { "hello-world": { <--…
Georgy
  • 2,410
  • 3
  • 21
  • 35