Merge pull request #3018 from jekyll/webrick-fancy-indexing
This commit is contained in:
		
						commit
						3285aebd4f
					
				|  | @ -75,16 +75,20 @@ module Jekyll | |||
| 
 | ||||
|         def webrick_options(config) | ||||
|           opts = { | ||||
|             :DocumentRoot       => config['destination'], | ||||
|             :Port               => config['port'], | ||||
|             :BindAddress        => config['host'], | ||||
|             :MimeTypes          => mime_types, | ||||
|             :DirectoryIndex     => %w(index.html index.htm index.cgi index.rhtml index.xml), | ||||
|             :DocumentRoot       => config['destination'], | ||||
|             :DoNotReverseLookup => true, | ||||
|             :StartCallback      => start_callback(config['detach']), | ||||
|             :DirectoryIndex     => %w(index.html index.htm index.cgi index.rhtml index.xml) | ||||
|             :MimeTypes          => mime_types, | ||||
|             :Port               => config['port'], | ||||
|             :StartCallback      => start_callback(config['detach']) | ||||
|           } | ||||
| 
 | ||||
|           if !config['verbose'] | ||||
|           if config['verbose'] | ||||
|             opts.merge!({ | ||||
|               :Logger => WEBrick::Log.new($stdout, WEBrick::Log::DEBUG) | ||||
|             }) | ||||
|           else | ||||
|             opts.merge!({ | ||||
|               :AccessLog => [], | ||||
|               :Logger => WEBrick::Log.new([], WEBrick::Log::WARN) | ||||
|  | @ -118,9 +122,10 @@ module Jekyll | |||
| 
 | ||||
|         # recreate NondisclosureName under utf-8 circumstance | ||||
|         def file_handler_options | ||||
|           fh_option = WEBrick::Config::FileHandler | ||||
|           fh_option[:NondisclosureName] = ['.ht*','~*'] | ||||
|           fh_option | ||||
|           WEBrick::Config::FileHandler.merge({ | ||||
|             :FancyIndexing     => true, | ||||
|             :NondisclosureName => ['.ht*','~*'] | ||||
|           }) | ||||
|         end | ||||
| 
 | ||||
|       end | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue