Add test for #1718
This commit is contained in:
parent
b4a6a503b3
commit
5cac6a1896
|
@ -9,6 +9,7 @@ Feature: Directory Index
|
||||||
| a_folder/needs_index/index.html |
|
| a_folder/needs_index/index.html |
|
||||||
| leave_me_alone.html |
|
| leave_me_alone.html |
|
||||||
| wildcard_leave_me_alone.html |
|
| wildcard_leave_me_alone.html |
|
||||||
|
| regex_leave_me_alone2.html |
|
||||||
| evil spaces/index.html |
|
| evil spaces/index.html |
|
||||||
| regular/index.html |
|
| regular/index.html |
|
||||||
| .htaccess |
|
| .htaccess |
|
||||||
|
@ -21,6 +22,7 @@ Feature: Directory Index
|
||||||
| a_folder/needs_index.html |
|
| a_folder/needs_index.html |
|
||||||
| leave_me_alone/index.html |
|
| leave_me_alone/index.html |
|
||||||
| wildcard_leave_me_alone/index.html |
|
| wildcard_leave_me_alone/index.html |
|
||||||
|
| regex_leave_me_alone2/index.html |
|
||||||
And the file "needs_index/index.html" should contain "Indexable"
|
And the file "needs_index/index.html" should contain "Indexable"
|
||||||
And the file "a_folder/needs_index/index.html" should contain "Indexable"
|
And the file "a_folder/needs_index/index.html" should contain "Indexable"
|
||||||
And the file "leave_me_alone.html" should contain "Stay away"
|
And the file "leave_me_alone.html" should contain "Stay away"
|
||||||
|
|
|
@ -2,3 +2,4 @@ activate :directory_indexes
|
||||||
page "/leave_me_alone.html", directory_index: false
|
page "/leave_me_alone.html", directory_index: false
|
||||||
|
|
||||||
page "/wildcard*", directory_index: false
|
page "/wildcard*", directory_index: false
|
||||||
|
page /regex_.*/, directory_index: false
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Stay away, wildcards!
|
|
@ -44,7 +44,7 @@ module Middleman
|
||||||
# @option opts [Hash] locals Local variables for the template. These will be available when the template renders.
|
# @option opts [Hash] locals Local variables for the template. These will be available when the template renders.
|
||||||
# @option opts [Hash] data Extra metadata to add to the page. This is the same as frontmatter, though frontmatter will take precedence over metadata defined here. Available via {Resource#data}.
|
# @option opts [Hash] data Extra metadata to add to the page. This is the same as frontmatter, though frontmatter will take precedence over metadata defined here. Available via {Resource#data}.
|
||||||
# @return [void]
|
# @return [void]
|
||||||
Contract String, Hash => Any
|
Contract Or[String, Regexp], Hash => Any
|
||||||
def page(path, opts={})
|
def page(path, opts={})
|
||||||
options = opts.dup
|
options = opts.dup
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue