coding style preferences (@parkr)
This commit is contained in:
parent
ba5db5ad5b
commit
d815e2b2a2
|
@ -16,7 +16,7 @@ module Jekyll
|
||||||
if @config['kramdown']['use_coderay']
|
if @config['kramdown']['use_coderay']
|
||||||
%w[wrap line_numbers line_numbers_start tab_width bold_every css default_lang].each do |opt|
|
%w[wrap line_numbers line_numbers_start tab_width bold_every css default_lang].each do |opt|
|
||||||
key = "coderay_#{opt}"
|
key = "coderay_#{opt}"
|
||||||
@config['kramdown'][key.to_sym] = @config['kramdown']['coderay'][key] unless @config['kramdown'].has_key? key
|
@config['kramdown'][key.to_sym] = @config['kramdown']['coderay'][key] unless @config['kramdown'].has_key?(key)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -109,11 +109,11 @@ module Jekyll
|
||||||
#
|
#
|
||||||
# Returns the post title
|
# Returns the post title
|
||||||
def title
|
def title
|
||||||
self.data.fetch("title", self.titleize_slug)
|
self.data.fetch("title", self.titleized_slug)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Turns the post slug into a suitable title
|
# Turns the post slug into a suitable title
|
||||||
def titleize_slug
|
def titleized_slug
|
||||||
self.slug.split('-').select {|w| w.capitalize! || w }.join(' ')
|
self.slug.split('-').select {|w| w.capitalize! || w }.join(' ')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue