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



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

def content(custom_front_matter = {})
  default_front_matter = front_matter_defaults_for("drafts")
  custom_front_matter.merge!(default_front_matter) if default_front_matter.is_a?(Hash)

  super(custom_front_matter)
end

#pathObject



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

def path
  "_drafts/#{file_name}"
end

#resource_typeObject



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

def resource_type
  "draft"
end