Static site generator based upon directories & fil

2020-06-04 09:30发布

问题:

I am looking for a nice way to generate a nested site structure in ruby. I want something that I can propose to clients instead of msword documents. Something of the form:

Home/
  index.txt
  About.txt
  Services/
    index.txt
    products.txt
    blahblah.txt

with the .txt files being markdown, or whatever.

I actually want to import this into a cms system, and just want to hook into whichever static-site generator that I can use.

Otherwise I will do it myself, but it would be nice to use something else for integration with html preprocessors etc.

回答1:

Take a look at Jekyll



回答2:

there is also middleman for generating static sites



回答3:

How about either of

  • Ace
  • nanoc
  • webby or
  • StaticMatic?


回答4:

The simplest of those I have seen is Stacey, though it does not run static content, it generates it on the fly, and its in PHP, but yeah it's just files and folders, even if you drop images or videos or pdf's on the folder they will be managed and added automatically. And they are just .txt files. http://www.staceyapp.com/

But, if I had to choose a static compiler in Ruby I'd go with nanoc. It's the most powerful and flexible I've seen and once you configure it with the rules and such, it's just files and folders too.

There is also Stasis, I haven't tried it but it seems pretty good.

http://stasis.me/



回答5:

Here's a gist featuring the most popular ones: https://gist.github.com/2254924



回答6:

Monkeyman (Scala) supports markdown and SCAML, the Scala version of SCAML. It will basically copies and transforms a folder structure, in any way you like. Without any processing it will copy the structure as is, but it has a slew of decorators that not only are able to transform the content, but also the location to anything you like.

It doesn't support compass, SASS or any of that yet (although being based on Scalate, it probably does transform coffeescript embedded into the template pages, but I haven't tried that.)



回答7:

DocPad works quite well. It supports a broad range of preprocessors.



标签: ruby web