config.rb 601 B

123456789101112131415161718192021222324252627282930313233
  1. helpers do
  2. def js_as_plain(id)
  3. f = open("docs/js/samples/" + id + ".js")
  4. js = f.read
  5. f.close
  6. js
  7. end
  8. def data_as_plain(name)
  9. f = open("docs/data/" + name)
  10. data = f.read
  11. f.close
  12. data
  13. end
  14. def css_as_plain(name)
  15. f = open("docs/css/samples/" + name)
  16. css = f.read
  17. f.close
  18. css
  19. end
  20. def get_css_name(path)
  21. path.gsub('.html', '')
  22. end
  23. end
  24. set :source, 'docs'
  25. set :haml, { :ugly => true, :format => :html5 }
  26. set :css_dir, 'css'
  27. set :js_dir, 'js'
  28. set :images_dir, 'img'
  29. configure :build do
  30. activate :asset_hash, :ignore => %r{^js/ace/.*}
  31. end