diff --git a/lib/jekyll/commands/draft.rb b/lib/jekyll/commands/draft.rb index a9770f9..59a7cf2 100644 --- a/lib/jekyll/commands/draft.rb +++ b/lib/jekyll/commands/draft.rb @@ -33,6 +33,8 @@ def self.process(args = [], options = {}) file_creator = Compose::FileCreator.new(draft, params.force?, params.source) file_creator.create! + + Compose::FileEditor.bootstrap(config) Compose::FileEditor.open_editor(file_creator.file_path) end @@ -46,17 +48,11 @@ def path end def content(custom_front_matter = {}) - default_front_matter = compose_config["draft_default_front_matter"] + default_front_matter = params.config.dig("jekyll_compose", "draft_default_front_matter") custom_front_matter.merge!(default_front_matter) if default_front_matter.is_a?(Hash) super(custom_front_matter) end - - private - - def compose_config - @compose_config ||= Jekyll.configuration["jekyll_compose"] || {} - end end end end