Treat dotfiles as files without extension
If the file starts with a dot, the whole filename is considered the basename and there is not extension.
This commit is contained in:
parent
16c19ecd19
commit
e9cf7b4636
|
@ -70,9 +70,15 @@ module Jekyll
|
||||||
#
|
#
|
||||||
# Returns nothing
|
# Returns nothing
|
||||||
def process(name)
|
def process(name)
|
||||||
|
# Is it a dotfile ?
|
||||||
|
if name[/^\./]
|
||||||
|
self.ext = ''
|
||||||
|
self.basename = name
|
||||||
|
else
|
||||||
self.ext = File.extname(name)
|
self.ext = File.extname(name)
|
||||||
self.basename = name.split('.')[0..-2].first
|
self.basename = name.split('.')[0..-2].first
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
# Add any necessary layouts to this post
|
# Add any necessary layouts to this post
|
||||||
# +layouts+ is a Hash of {"name" => "layout"}
|
# +layouts+ is a Hash of {"name" => "layout"}
|
||||||
|
|
Loading…
Reference in New Issue