Add json extension to list of directory indices (#6550)

Merge pull request 6550
This commit is contained in:
Aaron D Borden 2017-11-13 13:30:23 -08:00 committed by Frank Taillandier
parent d8d6360107
commit 32d1b43fc0
No known key found for this signature in database
GPG Key ID: E73258E3F50AEB7E
1 changed files with 10 additions and 7 deletions

View File

@ -17,6 +17,15 @@ module Jekyll
"Skips the initial site build which occurs before the server is started.",],
}.freeze
DIRECTORY_INDEX = %w(
index.htm
index.html
index.rhtml
index.cgi
index.xml
index.json
).freeze
#
def init_with_program(prog)
@ -85,13 +94,7 @@ module Jekyll
:StartCallback => start_callback(opts["detach"]),
:BindAddress => opts["host"],
:Port => opts["port"],
:DirectoryIndex => %w(
index.htm
index.html
index.rhtml
index.cgi
index.xml
),
:DirectoryIndex => DIRECTORY_INDEX,
}
opts[:DirectoryIndex] = [] if opts[:JekyllOptions]["show_dir_listing"]