Harp Weekly – Appetisers

On Thursday, we shared the beginnings of the Harp recipes section—patterns and snippets that might be useful when creating sites and apps with Harp.

So far, there are a number of useful static blog recipes: easily create excerpts for your blog posts, or use a partial to add Disqus comments to your site. We’ve already receive requests on Twitter for what to cover next. Make sure to reply to @HarpWebServer if you’re looking for something specific and we’ll do our best to add it to the list.

Middleware Recipes

After last week’s focus on using Harp as middleware in a larger application, we’ve seen some patterns that could be middleware recipes soon, too.

Simple Auth

Nuno Job has put together an example of adding simple authentication to a Harp app. If you need a fast way to keep something private, this is one way to approach the problem.

Syntax Highlighting

If you’re writing documentation or technical blog posts, adding syntax highlighting is nice detail to be able to include. Ole Petter Bang looked at adding syntax highlighting to an Express application using Harp, by modifying some its the preprocessing settings.

If you aren’t running your Harp application as middleware, there’s still a number of reliable client-side options for syntax highlighting. For harpjs.com, we’re using Prism.js to help illuminate the Harp documentation.

Grunt-Harp updated

Harp can make build steps unnecessary, and it can also work as one. If your setup uses Grunt, you can still use Harp’s implicit preprocessing with this Grunt task for Harp. It received a minor updated this week.

Next Harp Weekly

If you’re making something with Harp, let us know on Twitter, @HarpWebServer. I’d be happy to include your project in next week’s post!

Subscribe to Harp Weekly