mirror of
https://github.com/jekyll/jekyll.git
synced 2026-01-30 17:28:29 -05:00
Convertible: consolidate empty check into Convertible#read
This commit is contained in:
@@ -61,8 +61,8 @@ module Jekyll
|
||||
Jekyll.logger.abort_with "Fatal:", "Invalid YAML front matter in #{File.join(base, name)}"
|
||||
end
|
||||
|
||||
if self.data['permalink'] && empty_permalink?(self.data['permalink'])
|
||||
Jekyll.logger.error "Error:", "Invalid permalink in #{File.join(base, name)}"
|
||||
if self.data['permalink'] && self.data['permalink'].size == 0
|
||||
Jekyll.logger.abort_with "Fatal:", "Invalid permalink in #{File.join(base, name)}"
|
||||
end
|
||||
|
||||
self.data
|
||||
@@ -270,15 +270,6 @@ module Jekyll
|
||||
Jekyll::Hooks.trigger hook_owner, :post_render, self
|
||||
end
|
||||
|
||||
# Check data permalink
|
||||
#
|
||||
# permalink - the data permalink
|
||||
#
|
||||
# Returns true if the permalink is valid, false if otherwise
|
||||
def empty_permalink?(permalink)
|
||||
permalink.length == 0
|
||||
end
|
||||
|
||||
# Write the generated page file to the destination directory.
|
||||
#
|
||||
# dest - The String path to the destination dir.
|
||||
|
||||
Reference in New Issue
Block a user