Harp Weekly – Harp v0.11.2

A new version of Harp was released this week. Whether you using the Harp Platform and Dropbox, keep GitHub projects in one main directory, or use Harp as a headless web server, the latest version of Harp includes updates to Multihost that will be useful to you.

You can install this new version of Harp using:

sudo npm install -g harp

You may leave off sudo if you’re on Windows or already have admin privileges. If you’re new to Harp, get started quickly here.

Harp v0.11.2 – Generic Multihost

Harp’s Multihost mode serves every subdirectory within the directory you specify. If you run harp multihost inside a folder, all the projects inside will be available in the browser as subdomains of harp.nu.

Harp’s multihost list view

Once you run harp multihost, you can visit your local server in the browser (localhost:9000 by default) and see the list of projects. Visiting any entry will take you to that project, served at a subdomain of .harp.nu. So, in this example, the sintaxi/ directory would be available at sintaxi.harp.nu:9000. We’ll have more examples of how you can use Multihost in the docs this week.

All updates in v0.11.2

The especially curious may also review the commit log.

Static poetry

The expressions are learned, the cues hinted and stored
We learn and predict and build the image of our affection

Ethan Joachim Eldridge

This week, the developer of the WordPress to Harp script wrote a post about a poetry blog he started with Harp.

Banishing .html extensions

With Harp, if you want your source content files to work as a static generated site, then you must refer to urls using .html.

I don't like this.

Remy Sharp, Harp Static

We love feedback! If you’re not using Harp to serve the sites you compile with it, presently, you may need to choose between a clean directory structure, and hard-coding .html in your links. (There’s a GitHub issue discussion on this, too.)

In the meantime, Remy has put together a pack called Harp Static, useful if you want a kind of strict mode, something witch Harp doesn’t have right now.

Other solutions to this problem include:

Next Harp Weekly

The next edition of Harp Weekly will be right after Static Showdown. Make sure to post how you’re using Harp; we’ll help share your entry through @HarpWebServer on Twitter.