nanoc

34
nanoc

Upload: joren-de-groof

Post on 27-Jun-2015

1.178 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Nanoc

nanoc

Page 2: Nanoc

static sitecompiler

Page 3: Nanoc

fast

Page 4: Nanoc

EXTREME CACHING

Page 5: Nanoc

safe

Page 6: Nanoc

versionable

Page 7: Nanoc

deploywithout worries

Page 8: Nanoc

example

Page 9: Nanoc

% nanoc create_site arrrrcamp

Page 10: Nanoc

% cd arrrrcamp% nanoc compile

Page 11: Nanoc
Page 12: Nanoc

pages

Page 13: Nanoc

<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>

Page 14: Nanoc

layouts

Page 15: Nanoc

  <body>    <div id="main"><%= @page.content %>    </div>    <div id="sidebar">      <h2>Documentation</h2>      <ul>        ...      </ul>      <h2>Community</h2>      <ul>        ...      </ul>    </div>  </body>

Page 16: Nanoc

page metadata

Page 17: Nanoc

title:      "My Home Page"author:     "Denis Defreyne"created_on: 2009‐05‐08

Page 18: Nanoc

filters

Page 19: Nanoc

filters

haml

redcloth

bluecloth

marukuerb

sass

rainpress

rdoc

rainpressrubypants erubis

Page 20: Nanoc

My Home Page============

Lorem ipsum…

* Foo* Bar* Baz

Page 21: Nanoc

<h1>My Home Page</h1>

<p>Lorem ipsum…</p>

<ul>  <li>Foo</li>  <li>Bar</li>  <li>Baz</li></ul>

Page 22: Nanoc

class Rainpress < Nanoc::Filter

  identifier :rainpress

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

end

Page 23: Nanoc

helpers

Page 24: Nanoc

<%= link_to(  'A random page written by me'  @pages.find { |p| p.author == 'Denis' }) %>

Page 25: Nanoc

demo

Page 26: Nanoc

real sites

Page 27: Nanoc
Page 28: Nanoc
Page 29: Nanoc
Page 30: Nanoc
Page 31: Nanoc
Page 32: Nanoc
Page 33: Nanoc

you can hazquestions?

Page 34: Nanoc

nanoc.stoneship.orgfreenode #nanoc

or google “nanoc”