Reject entries that are just dots in a directory

This commit is contained in:
Ashwin Maroli 2019-06-09 11:42:34 +05:30
parent 13d31c4c8b
commit 49e5b33fb0
1 changed files with 3 additions and 0 deletions

View File

@ -31,6 +31,9 @@ module Jekyll
def filter(entries)
entries.reject do |e|
# Reject this entry if it is just a "dot" representation.
# e.g.: '.', '..', '_movies/.', 'music/..', etc
next true if e.end_with?(".")
# Reject this entry if it is a symlink.
next true if symlink?(e)
# Do not reject this entry if it is included.