Code for drawings.hcoder.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

82 lines
1.6KB

  1. ###
  2. # Compass
  3. ###
  4. # Change Compass configuration
  5. # compass_config do |config|
  6. # config.output_style = :compact
  7. # end
  8. ###
  9. # Page options, layouts, aliases and proxies
  10. ###
  11. # Per-page layout changes:
  12. #
  13. # With no layout
  14. # page "/path/to/file.html", :layout => false
  15. page "/rss/index.xml", :layout => false
  16. #
  17. # With alternative layout
  18. # page "/path/to/file.html", :layout => :otherlayout
  19. #
  20. # A path which all have the same layout
  21. # with_layout :admin do
  22. # page "/admin/*"
  23. # end
  24. # Proxy pages (http://middlemanapp.com/basics/dynamic-pages/)
  25. # proxy "/this-page-has-no-template.html", "/template-file.html", :locals => {
  26. # :which_fake_page => "Rendering a fake page with a local variable" }
  27. ###
  28. # Helpers
  29. ###
  30. # Automatic image dimensions on image_tag helper
  31. # activate :automatic_image_sizes
  32. # Reload the browser automatically whenever files change
  33. # configure :development do
  34. # activate :livereload
  35. # end
  36. require "utils"
  37. # Methods defined in the helpers block are available in templates
  38. helpers do
  39. def picture_info
  40. picture_info_hashes
  41. end
  42. def picture_info_for_tag(tag)
  43. picture_info_hashes.find_all {|info|
  44. info[:tags].include? tag
  45. }
  46. end
  47. end
  48. set :css_dir, 'stylesheets'
  49. set :js_dir, 'javascripts'
  50. set :images_dir, 'images'
  51. # Build-specific configuration
  52. configure :build do
  53. # For example, change the Compass output style for deployment
  54. # activate :minify_css
  55. # Minify Javascript on build
  56. # activate :minify_javascript
  57. # Enable cache buster
  58. # activate :asset_hash
  59. # Use relative URLs
  60. # activate :relative_assets
  61. # Or use a different image path
  62. # set :http_prefix, "/Content/images/"
  63. end