Site web

config.rb 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. activate :autoprefixer do |prefix|
  2. prefix.browsers = "last 2 versions"
  3. end
  4. page 'index.html', layout: :content
  5. page '/*.xml', layout: false
  6. page '/*.json', layout: false
  7. page '/*.txt', layout: false
  8. configure :development do
  9. activate :livereload, host: 'localhost', apply_css_live: true, apply_js_live: true, no_swf: true
  10. end
  11. configure :build do
  12. #activate :minify_css
  13. #activate :minify_javascript, compressor: proc { ::Uglifier.new harmony: true }
  14. # activate :asset_hash
  15. #set :http_prefix, '/tmp'
  16. end
  17. activate :deploy do |deploy|
  18. deploy.deploy_method = :rsync
  19. deploy.host = 'rabbit.passageenseine.fr'
  20. deploy.path = '/var/www/pses'
  21. deploy.port = 2222
  22. deploy.build_before = true
  23. # Optional Settings
  24. # deploy.user = 'tvaughan' # no default
  25. # deploy.port = 5309 # ssh port, default: 22
  26. # deploy.clean = true # remove orphaned files on remote host, default: false
  27. # deploy.flags = '-rltgoDvzO --no-p --del' # add custom flags, default: -avz
  28. end
  29. helpers do
  30. def svg_image_tag(image, id, *args, **kwargs)
  31. path = image_path image
  32. content_tag :svg, *args, **kwargs do
  33. tag :use, 'xlink:href': "#{path}##{id}"
  34. end
  35. end
  36. end