puts "Gumdrop v#{Gumdrop::VERSION} building..." configure do set :site_title, "My Site" set :site_tagline, "My home on thar intarwebs!" set :site_author, "Me" set :site_url, "http://www.mysite.com" # All the supported build configuration settings and their defaults: # set :output_dir, "./output" # set :lib_dir, "./lib" # set :source_dir, "./source" # set :data_dir, './data' # set :relative_paths, true # set :proxy_enabled, true # set :log_level, :info # set :log, 'logs/build.log' end # Skipping files entirely from build process... Like they don't exist. # skip 'file-to-ignore.html' # skip 'dont-show/' # Ignores source file(s) from compilation, but does load the content into memory # ignore 'pages/' # NOTE: Skipping and ignoring matches simply with starts_with?... So if a path, from the # source directory, starts with the specified string, it'll skip or ignor it. (this # doesn't work for files detected by stitch) # Example site-level generator generate do stitch 'app.js', # JavaScript to assemble :identifier=>'app', # variable name for the library :paths=>['./app'], :root=>'./app', :dependencies=>[], # List of scripts to prepend to top of file (non moduled) :prune=>false, # If true, removes the source files from Gumdrop.site hash :compress=>:jsmin, # Options are :jsmin, :yuic, :uglify :obfuscate=>false, # For compressors that support munging/mangling :keep_src=>true # Creates another file, ex: app-src.js stitch 'lib.js', :identifier=>'lib', :paths=>['./lib'], :root=>'./lib', :prune=>true, :compress=>false, :obfuscate=>false, :keep_src=>false # Requires a about.template.XX file # page "about.html", # :template=>'about', # :passthru=>'Available in the template' # page 'robots.txt' do # # And content returned will be put in the file # """ # User-Agent: * # Disallow: / # """ # end # Maybe for a tumblr-like pager # pager= Gumdrop.data.pager_for :posts, base_path:'posts/page', page_size:5 # pager.each do |page| # page "#{page.uri}.html", # template:'post_page', # posts:page.items, # pager:pager, # current_page:pager.current_page # end end # Example of using a content filter to compress CSS output # require 'yui/compressor' # content_filter do |content, info| # if info.ext == '.css' # puts " Compress: #{info.filename}" # compressor= YUI::CssCompressor.new # compressor.compress( content ) # else # content # end # end # View helpers (available in rendering context): view_helpers do # Calculate the years for a copyright def copyright_years(start_year, divider="–") end_year = Date.today.year if start_year == end_year "#{start_year}" else "#{start_year}#{divider}#{end_year}" end end # # Your custom helpers go here! # end # Any specialized code for your site goes here... require 'slim' Slim::Engine.set_default_options pretty:true