Class: Jekyll::Commands::Draft::DraftFileInfo

Inherits:
Jekyll::Compose::FileInfo show all
Defined in:
lib/jekyll/commands/draft.rb

Instance Attribute Summary

Attributes inherited from Jekyll::Compose::FileInfo

#params

Instance Method Summary collapse

Methods inherited from Jekyll::Compose::FileInfo

#file_name, #initialize

Constructor Details

This class inherits a constructor from Jekyll::Compose::FileInfo

Instance Method Details

#content(custom_front_matter = {}) ⇒ Object



50
51
52
53
54
55
# File 'lib/jekyll/commands/draft.rb', line 50

def content(custom_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

#pathObject



46
47
48
# File 'lib/jekyll/commands/draft.rb', line 46

def path
  "_drafts/#{file_name}"
end

#resource_typeObject



42
43
44
# File 'lib/jekyll/commands/draft.rb', line 42

def resource_type
  "draft"
end