Sha256: 9f690517bdaf3936d317beca6008e9412f6d8aba3f237350216f9892eca8a192

Contents?: true

Size: 612 Bytes

Versions: 21

Compression:

Stored size: 612 Bytes

Contents

# Any specialized code for your site goes here...

puts "Building: #{Gumdrop.data.config.title}"

new_posts= Gumdrop.data.posts.map do |post|
  mdt= Tilt['markdown'].new { post.content }
  post.body = mdt.render
  post
end

Gumdrop.data.set :blog, new_posts, :persist=>true


generate do
  
  page "my-root-page.html", :template=>'test', :info=>"FROM SITE.RB"
  
  pager= Gumdrop.data.pager_for :blog, :base_path=>'posts/page', :page_size=>1
  
  pager.each do |pageset|
    page "#{pageset.uri}.html", :template=>'post_page', :posts=>pageset.items, :pager=>pager, :current_page=>pager.current_page
  end
  
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
gumdrop-0.4.0 examples/simple/lib/site.rb
gumdrop-0.3.10 examples/simple/lib/site.rb
gumdrop-0.3.9 examples/simple/lib/site.rb
gumdrop-0.3.8 examples/simple/lib/site.rb
gumdrop-0.3.7 examples/simple/lib/site.rb
gumdrop-0.3.6 examples/simple/lib/site.rb
gumdrop-0.3.5 examples/simple/lib/site.rb
gumdrop-0.3.4 examples/simple/lib/site.rb
gumdrop-0.3.3 examples/simple/lib/site.rb
gumdrop-0.3.2 examples/simple/lib/site.rb
gumdrop-0.3 examples/simple/lib/site.rb
gumdrop-0.2.16 examples/simple/lib/site.rb
gumdrop-0.2.15 examples/simple/lib/site.rb
gumdrop-0.2.14 examples/simple/lib/site.rb
gumdrop-0.2.13 examples/simple/lib/site.rb
gumdrop-0.2.12 examples/simple/lib/site.rb
gumdrop-0.2.11 examples/simple/lib/site.rb
gumdrop-0.2.10 examples/simple/lib/site.rb
gumdrop-0.2.9 examples/simple/lib/site.rb
gumdrop-0.2.8 examples/simple/lib/site.rb