class Jekyll::Scholar::Details
Public Class Methods
new(site, base, dir, entry)
click to toggle source
# File lib/jekyll/scholar/generators/details.rb, line 7 def initialize(site, base, dir, entry) @site, @base, @dir, @entry = site, base, dir, entry @config = Scholar.defaults.merge(site.config['scholar'] || {}) # Specify a temporary filename for now based upon the citation key. Jekyll # will modify this according to the URL template below @name = entry.key.to_s.gsub(/[:\s]+/, '_') @name << '.html' process(@name) read_yaml(File.join(base, '_layouts'), config['details_layout']) data.merge!(reference_data(entry)) data['title'] = data['entry']['title'] if data['entry'].has_key?('title') end
Public Instance Methods
url()
click to toggle source
# File lib/jekyll/scholar/generators/details.rb, line 24 def url # Reuse the logic in the utilities module for deciding URLs details_path_for(@entry) end