开发者

What's the best way (or package) to build a static site using Node.js? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 9 years ago.

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 recommenda开发者_JAVA百科tions 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.


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.


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.


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

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜