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?

有帮助吗?

解决方案

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.

其他提示

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.

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.

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

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top