sass-site/config.ru

34 lines
1.1 KiB
Plaintext
Raw Normal View History

2012-09-27 03:26:50 -07:00
require "rubygems"
2013-10-12 19:53:19 -04:00
require "rack/rewrite"
2013-10-16 23:46:28 -04:00
require "rack/contrib/not_found"
require "rack/contrib/try_static"
use Rack::Rewrite do
r301 %r{/docs/yardoc/(.*)}, '/documentation/$1'
r301 '/tutorial.html', '/guide'
r301 '/download.html', '/install'
2013-10-15 13:53:50 -07:00
r301 '/try', 'http://sassmeister.com'
r301 '/try.html', 'http://sassmeister.com'
r301 '/about', '/'
r301 '/about.html', '/'
r301 '/documentation/file.SASS_REFERENCE.html', '/documentation'
r301 '/documentation/file.SASS_CHANGELOG.html', 'https://github.com/sass/dart-sass/blob/master/CHANGELOG.md'
r301 '/documentation/file.INDENTED_SYNTAX.html', '/documentation/syntax'
r301 '/documentation/file.SCSS_FOR_SASS_USERS.html', '/documentation/syntax'
r301 '/documentation/Sass/Script/Functions.html', '/documentation/functions'
r301 %r{/documentation/(Sass.*)}, 'http://www.rubydoc.info/gems/sass/$1'
r301 %r{/(.+)/$}, '/$1'
r301 %r{/(.+)/index\.html$}, '/$1'
2019-02-22 17:12:22 -08:00
end
2013-10-16 23:51:08 -04:00
use Rack::Deflater
use Rack::TryStatic,
urls: ["/"], root: 'build', index: 'index.html',
try: ['.html', '/index.html']
2013-10-16 23:46:28 -04:00
run Rack::NotFound.new("build/404.html")