SlideShare a Scribd company logo
1 of 34
Download to read offline
nanoc
static site
compiler
fast
EXTREME
CACHING
safe
versionable
deploy
without worries
example
% nanoc create_site arrrrcamp
% cd arrrrcamp
% nanoc compile
pages
<h1>A Brand New nanoc Site</h1>

<p>You've just created a new nanoc site. The 
page you are looking at right now is the home 
page for your site (and it's probably the only 
page).</p>
layouts
  <body>
    <div id=quot;mainquot;>
<%= @page.content %>
    </div>
    <div id=quot;sidebarquot;>
      <h2>Documentation</h2>
      <ul>
        ...
      </ul>
      <h2>Community</h2>
      <ul>
        ...
      </ul>
    </div>
  </body>
page metadata
title:      quot;My Home Pagequot;
author:     quot;Denis Defreynequot;
created_on: 2009‐05‐08
filters
rdoc                bluecloth
        haml
                  rainpress
rubypants
                              erubis
            filters
      rainpress        redcloth
erb
                              sass
            maruku
My Home Page
============

Lorem ipsum…

* Foo
* Bar
* Baz
<h1>My Home Page</h1>

<p>Lorem ipsum…</p>

<ul>
  <li>Foo</li>
  <li>Bar</li>
  <li>Baz</li>
</ul>
class Rainpress < Nanoc::Filter

  identifier :rainpress

  def run(content)
    ::Rainpress.compress(content)
  end

end
helpers
<%= link_to(
  'A random page written by me'
  @pages.find { |p| p.author == 'Denis' }
) %>
demo
real sites
you can haz
questions?
nanoc.stoneship.org
  freenode #nanoc
 or google “nanoc”

More Related Content

More from joren de groof (9)

Git techtalk
Git techtalkGit techtalk
Git techtalk
 
Tatft
TatftTatft
Tatft
 
Rubyandrails
RubyandrailsRubyandrails
Rubyandrails
 
Rails Servers
Rails ServersRails Servers
Rails Servers
 
Radiant
RadiantRadiant
Radiant
 
Prawn
PrawnPrawn
Prawn
 
Mistakes
MistakesMistakes
Mistakes
 
Git
GitGit
Git
 
Cucumber
CucumberCucumber
Cucumber
 

Nanoc