Skip to content
Snippets Groups Projects
Commit 9a9e0939 authored by fauno's avatar fauno
Browse files

prevent nil slugs

parent e48e704d
No related branches found
No related tags found
No related merge requests found
...@@ -36,11 +36,11 @@ module Jekyll ...@@ -36,11 +36,11 @@ module Jekyll
@last_cat = nil @last_cat = nil
@extra = extra @extra = extra
@single_post = not(posts.is_a? Array) @single_post = !(posts.is_a? Array)
if single_post? if single_post?
@title = title || posts.data['title']
@posts = [posts] @posts = [posts]
@title = title or posts.data['title']
else else
@posts = posts @posts = posts
...@@ -76,7 +76,7 @@ module Jekyll ...@@ -76,7 +76,7 @@ module Jekyll
# if permalink ends with trailing .html or trailing slash, path now ends with proper suffix # if permalink ends with trailing .html or trailing slash, path now ends with proper suffix
# for other cases (permalink with no trailing extension or slash), append format # for other cases (permalink with no trailing extension or slash), append format
# (ie /year/month/slug permalink --> /year/month/slug.pdf) # (ie /year/month/slug permalink --> /year/month/slug.pdf)
if not path.end_with? ".#{@format}" unless path.end_with? ".#{@format}"
path << '.' path << '.'
path << @format path << @format
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment