

Nanoc: a Ruby site compiler that generates static HTML - wallflower
http://nanoc.stoneship.org/

======
swombat
Seems to be thoroughly identical to Webby:
<http://webby.rubyforge.org/tutorial/>

Or am I missing a trick?

~~~
callmeed
And Jekyll

<http://github.com/mojombo/jekyll>

is static site generation a big pain point for a lot of people?

~~~
Legion
That is the part I'm not understanding. What does using one of these "static
site compilers" save me from?

I guess being able to use layouts that get "baked" into each of the final
static HTML files would be handy.

~~~
brianm
Mostly it takes you from thinking 50 requests per second is pretty good to
being annoyed that you are only pushing 10,000 per second. It also tends to
fail a whole lot less.

~~~
compay
And hosting it for free at Github.

------
terrellm
Let's also not forget StaticMatic <http://www.staticmatic.net/>. It has great
support for HAML and SASS.

A helpful tip with for all of these static generators - if you need PHP or
other code, just put it in the static HTML and have your deploy script rename
the files to .PHP before rsync'ing them.

~~~
jrnkntl
Regarding your PHP 'tip', that kinda makes the whole point of using a static
generator in the first place a bit useless. And when you decide to do it
anyway, configure your apache (or whatever you like) to parse .html as php.

~~~
terrellm
It doesn't make it useless as all of my site is static except the contact
form. To utilize another option just for a few lines of code in a contact form
didn't seem practical to me.

I'm sure open to suggestions though.

Thanks for the tip on configuring Apache... I may look into that next time.
I've got my .htaccess set to rewrite the urls to extensionless, so it didn't
make too much of a difference.

------
mikeytown2
Interesting yes, but dynamic to static generators/caches are plentiful. Almost
every framework/cms has something like this. I'm the current maintainer of
Boost - file caching for Drupal. IMO Boost offers more to the site admin then
Nanoc: it supports Apache, Nginx, Lighttpd, & IIS; Caches HTML, XML, CSS, JS,
& JSON. In a test, the Nginx version of Boost is faster then Varnish. Boost is
also tightly integrated with Drupal, offering smart flushing of the cache and
a multi process crawler.

Nanoc in comparison seems to add more administrative overhead to your sites
work-flow; it should try to be smarter to make the web admins life better.
Also, not having a dynamic language on the web server severely limits what's
possible; a simple contact form has to be handled separately, thus making any
site built with this even more complicated IMHO.

------
newhouseb
I don't understand why we need to "compile" everything, computers are fast. I
made/use Simple Web Schema
(<http://bennewhouse.com/open_source/simple_website_schema>) which generates
pages on the fly from an XML document using PHP - sounds nasty but it's quite
elegant (imho). It does require PHP (and what cheap hosting doesn't provide
PHP?) and response time for a reasonably sized site (mine) is around 7ms
single threaded, and scales well because no locking is needed - no compiling
needed.

~~~
ZitchDog
One of the most successful projects I worked on used static HTML generation.
It was a company-wide system status site, so it needed to be up no mater what,
no matter what type of issues we were experiencing. Using this approach we
didn't have to worry about database issues or anything. Just static HTML
hosted by a CDN offsite.

~~~
newhouseb
Hmm yeah, my stuff doesn't use a database either (it uses XPath and DOM/XML
doc). Is it standard for CDNs to run anything beyond a naked apache instance
(like mod_php)?

~~~
ZitchDog
It seems like a giant can of worms to introduce mod_php. Do you allow
sessions? Replication? How do you handle caching? These are non-trivial
problems at CDN-level loads.

Offering 100% availability is crazy difficult once you add dynamic content
into the mix. If you could do it, I bet you could make a million bucks.

~~~
kingkilr
Availabity with dynamic content is easy (ok not easy, but it's a fairly
routine straightforward process). The CAP theorem says you get 2 out of the 3
of consistency, availability, partition tolerance. Just getting availability
and partition tolerance by themselves is just a matter of good engineering,
nothing revolutionary.

------
loup-vaillant
Me too! <http://www.loup-vaillant.fr/projects/ussm/>

Not as polished, of course, but usable enough to make my web site.
Improvements coming soon.

------
sunkencity
I've used nanoc for my blog for a while. It's ok, but the next time I do need
static HTML generation I think I will just use rails that I host locally and
then statically mirror the site with wget --mirror and rsync.

------
spooneybarger
This is so very old hat. Has been time over time over time for years. Why is
this so high up on HN?

------
rick_2047
Where can one host sites like these?I think anywhere where one can get shell
access?

~~~
terrellm
Just create them locally on your computer and use rsync or ftp to send them to
your web host.

With static HTML, you don't need any databases and it doesn't matter what type
of server or operating system your host is running.

~~~
rick_2047
But nanoc does not just output the static html, it gives just the files, with
no side bars and all. I think the layout part is not there.

~~~
rick_2047
Realized my mistake here, sorry for the misinformation.

------
whalesalad
The website is painful to look at. We really need to nip the whole rotated
screenshot trend in the bud. Here's to 2010.

