Skip to content

Commit

Permalink
merge post_default_front_matter config setting
Browse files Browse the repository at this point in the history
  • Loading branch information
toshimaru committed Oct 7, 2018
1 parent 8195ded commit 37355c5
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lib/jekyll/commands/post.rb
Expand Up @@ -64,12 +64,17 @@ def _time_stamp
end

def content(custom_front_matter = {})
if jekyll_compose_config && jekyll_compose_config["post_default_front_matter"]
custom_front_matter.merge!(jekyll_compose_config["post_default_front_matter"])
end

super({ "date" => _time_stamp }.merge(custom_front_matter))
end

def content
post_front_matter = Jekyll.configuration["post_front_matter"]
post_front_matter ? super(post_front_matter) : super
private

def jekyll_compose_config
@jekyll_compose_config ||= Jekyll.configuration["jekyll_compose"]
end
end
end
Expand Down

0 comments on commit 37355c5

Please sign in to comment.