Allowing .htaccess files to be copied over into the generated site, to help those migrating from other blogging systems. Used an array inlcusion check vs. == in case there are other special cases like this, subtly thumbing my nose at YNGNI I guess.
This commit is contained in:
parent
94c06d0100
commit
6980948528
|
@ -88,7 +88,8 @@ module Jekyll
|
|||
# Copy all regular files from <source> to <dest>/ ignoring
|
||||
# any files/directories that are hidden or backup files (start
|
||||
# with "." or end with "~") or contain site content (start with "_")
|
||||
# unless they are "_posts" directories
|
||||
# unless they are "_posts" directories or web server files such as
|
||||
# '.htaccess'
|
||||
# The +dir+ String is a relative path used to call this method
|
||||
# recursively as it descends through directories
|
||||
#
|
||||
|
@ -98,7 +99,7 @@ module Jekyll
|
|||
entries = Dir.entries(base)
|
||||
entries = entries.reject { |e| e[-1..-1] == '~' }
|
||||
entries = entries.reject do |e|
|
||||
(e != '_posts') and ['.', '_'].include?(e[0..0])
|
||||
(e != '_posts') and ['.', '_'].include?(e[0..0]) unless ['.htaccess'].include?(e)
|
||||
end
|
||||
|
||||
# we need to make sure to process _posts *first* otherwise they
|
||||
|
|
Loading…
Reference in New Issue