21

In Short

What's the best way to set up a static blog with Markdown and RSS support, just like this guy did, but use Node and a JavaScript web-framework instead of Python & Django?


In Length

I'd like to build a static site using Node.js, preferably using the help of a ready-made package, similiar to Ruby's Jekyll or Python's Hyde. I'll need some server-side templating (e.g. jade, HAML, Jinja), and maybe some Markdown support, though not necessary.

I've already found out about Express, Petrify, and Node-blog, but I'm not sure they're the right choice.

Any recommendations on the recommended way of action?

3
  • Have you looked at express for node? Its pretty great, and you could roll your own blog fairly easily.
    – Loktar
    Sep 7, 2011 at 3:34
  • 1
    @Loktar: Yes I have. It's a web framework, more similiar to Ruby's Sinatra or Python's Flask. It's a bit overkill for a static site.
    – Ory Band
    Sep 7, 2011 at 11:10
  • I'm using npmjs.com/package/web-boost (twig + sass/scss + express => static site) Mar 15, 2018 at 20:24

4 Answers 4

15

I highly recommend wintersmith. It is built on node and written in coffeescript.

From wintersmith's features page:

  • Easy to use
  • Generated sites can be hosted anywhere (output is plain html)
  • Write articles/pages using markdown
  • Robust templating using Jade
  • Preview server (no need to rebuild every time you make a change)
  • Highly configurable
  • Extendable using plugins
  • FAST!

To see it in action, check out these examples.

You can also get a working wintersmith site going with:

$ npm install wintersmith -g
$ wintersmith new <path>
$ cd <path>
$ wintersmith preview

I have tried DocPad, wheat, scotch, and blacksmith and have found wintersmith much simpler than DocPad (a true static site generator) and better out of the box, better maintained, and better supported by plugins than the rest.

I am in the process of rebuilding two of my sites to use it.

9

I just released Kerouac.

I wanted the most ridiculously easy (yet flexible, if needed) way to generate static sites for my projects. No existing solution quite fit the bill, so Kerouac was created. It's heavily inspired by the concept of middleware in Express, so if you're also developing dynamic web apps in Node, Kerouac will feel instantly familiar. The middleware approach proved remarkably effective even for static sites, yielding a simple high-level API with an infinitely flexible low-level API for the inevitable tweaks and customizations.

3
  • 2
    and yet I did the same thing for Passport (stackoverflow.com/questions/3498005/…) and it is now the most popular answer! Just trying to make sure people trying to solve this problem are aware of a useful solution. May 4, 2013 at 21:03
  • @cHao I think it's totally acceptable, considering it solves the problem I asked about.
    – Ory Band
    May 8, 2013 at 16:22
  • A solid solution. I very much like the simplicity and configurability. Reminds me of Express. Sep 13, 2013 at 0:21
8

Give DocPad a whirl: http://docpad.org

DocPad is a CMS with a document-management based approach. It's actively maintained and supported by a growing community. It's modular, easy to extend and able to be used inside bigger systems. It already supports lots of markups and pre-processors through plugins and powers many websites.

1

Checkout wheat http://search.npmjs.org/#/wheat

Also bookmark that site, it's great to find node.js packages.

2
  • Looks to be a bit in its early stages and not well-documented, isn't it?
    – Ory Band
    Sep 7, 2011 at 11:13
  • It's used to run howtonode.org Sep 7, 2011 at 17:38

Not the answer you're looking for? Browse other questions tagged or ask your own question.