

What static web site generators would you use? - emson

Hi All,<p>I need to build a simple static web site. Previously in the past I've played around with StaticMatic &#60;http://staticmatic.rubyforge.org/&#62; and found it quite good.<p>Howeve the version number does not seem to have changed for a while and you are tied to HAML, not that that is a bad thing, its just it would be nice to be able to use other template languages.<p>I've also read an article here by Tom Preston-Werner &#60;http://tom.preston-werner.com&#62; about his tool Jekyll &#60;http://github.com/mojombo/jekyll/tree/master&#62;.  It looks very interesting, has anybody used it?  Is it more blog orientated, by that I mean is it harder to use it for a different context?<p>Finally I did a Google search and found this tool:  &#60;http://webgen.rubyforge.org/&#62;.  Again has anyone used it or got any comments about it.<p>My requirements are to create a simple 4 page site where the content isn't going to change that often.  I would like to use Markdown / Textile / Haml / ERB.
I also like code to be clean and efficient therefore the HTML generator should be pretty small and easy to use.  Ideally I'd like to use Ruby and Ruby gems, but I'm not fussy.<p>Anyway I'd appreciate your input.
Many thanks,<p>Ben Emson...
======
gettalong
I'm a little biased (I'm the author of webgen :) but I think webgen would suit
your needs. You can install it via `gem install webgen`, it runs on Ruby 1.8,
1.9 and JRuby, supports Markdown/Textile/Haml/ERB/... and is easy to use:

* Create your website:
    
    
        webgen create my_site
    

* Render your website:
    
    
        cd my_site; webgen
    

The built website uses only relative URLs, so you can preview it by just
opening `my_site/out/index.html`. Adding a page is as simple as adding a file
with the extension page to the my_site/src directory. The styling of the site
is done via templates, the main template being my_site/src/default.template.
You can select from several different styles when creating a website (see
`webgen help create`).

Menus, breadcrumb trails, links to translations of the current page are all
automatically generated.

You can, if you need/want to, use webgen from a Ruby script:

    
    
        require 'webgen/website'
        ws = Webgen::Website.new(ws_directory)  # ws_directory would be the my_site directory in the example above
        ws.render
    

For more information have a look at the webgen website.

~~~
emson
Hi gettalong

That looks really interesting - I do a lot of web site work for clients, in
Rails, PHP and simple static HTML sites.

I've found that sometimes you want to mock up simple sites without using a
framework or a CMS system like Drupal, but want to keep your code DRY.

Also some small companies often won't want to change their data frequently and
would rather pay someone to do it for them and I think this is the best tool
for the job.

Thanks for you comment I'll have a play with webgen it looks like an
interesting project.

Many thanks Ben Emson...

------
qhoxie
_I need to build a simple static web site._

It depends a lot on what you specifically need from the tool, but given what
you have used previously, Webby may be your best bet. It is a wonderfully
simple yet powerful tool.

<http://webby.rubyforge.org/>

 _I've also read an article here by Tom Preston-Werner <[http://tom.preston-
werner.com>](http://tom.preston-werner.com>); about his tool Jekyll_

Jekyll is a nice tool but it is geared toward blogs. Tom noted this as the
reason he created it instead of using Webby.

------
pedalpete
Not sure exactly what you are trying to do, and why you would go through the
overhead of one of these programs.

Why not just write the html yourself, or use something like google sites?

I think you'd spend more time learning to use one of these tools (and looking
for and deciding which one) than it would take you to build a site.

If you really don't think you have the chops for writing your own html, or
don't think google sites or something similar is for you, how about having
somebody set up a joomla or drupal site for you?

