Add json extension to list of directory indices (#6550)
Merge pull request 6550
This commit is contained in:
parent
5cb8a0e847
commit
707a8c7a0e
|
@ -17,6 +17,15 @@ module Jekyll
|
||||||
"Skips the initial site build which occurs before the server is started.",],
|
"Skips the initial site build which occurs before the server is started.",],
|
||||||
}.freeze
|
}.freeze
|
||||||
|
|
||||||
|
DIRECTORY_INDEX = %w(
|
||||||
|
index.htm
|
||||||
|
index.html
|
||||||
|
index.rhtml
|
||||||
|
index.cgi
|
||||||
|
index.xml
|
||||||
|
index.json
|
||||||
|
).freeze
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
||||||
def init_with_program(prog)
|
def init_with_program(prog)
|
||||||
|
@ -85,13 +94,7 @@ module Jekyll
|
||||||
:StartCallback => start_callback(opts["detach"]),
|
:StartCallback => start_callback(opts["detach"]),
|
||||||
:BindAddress => opts["host"],
|
:BindAddress => opts["host"],
|
||||||
:Port => opts["port"],
|
:Port => opts["port"],
|
||||||
:DirectoryIndex => %w(
|
:DirectoryIndex => DIRECTORY_INDEX,
|
||||||
index.htm
|
|
||||||
index.html
|
|
||||||
index.rhtml
|
|
||||||
index.cgi
|
|
||||||
index.xml
|
|
||||||
),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
opts[:DirectoryIndex] = [] if opts[:JekyllOptions]["show_dir_listing"]
|
opts[:DirectoryIndex] = [] if opts[:JekyllOptions]["show_dir_listing"]
|
||||||
|
|
Loading…
Reference in New Issue