Class: Jekyll::Scholar::Details
- Inherits:
-
Page
- Object
- Page
- Jekyll::Scholar::Details
- Includes:
- Utilities
- Defined in:
- lib/jekyll/scholar/generators/details.rb
Instance Attribute Summary
Attributes included from Utilities
#config, #context, #max, #offset, #prefix, #site, #text
Instance Method Summary collapse
-
#initialize(site, base, dir, entry) ⇒ Details
constructor
A new instance of Details.
Methods included from Utilities
#base_url, #bibliography, #bibliography_tag, #bibliography_template, #bibtex_file, #bibtex_files, #bibtex_filters, #bibtex_options, #bibtex_path, #bibtex_paths, #citation_item_for, #citation_number, #cite, #cite_details, #cited_keys, #cited_only?, #cited_references, #content_tag, #details_file_for, #details_link_for, #details_path, #entries, #extend_path, #generate_details?, #group, #group?, #group_by, #group_compare, #group_keys, #group_name, #group_order, #group_order=, #group_tags, #group_value, #grouper, #interpolate, #join_strings?, #keys, #labels, #limit_entries?, #link_target_for, #link_to, #liquid_template, #liquidify, #load_repository, #locators, #missing_reference, #month_names, #optparse, #query, #raw_bibtex?, #reference_data, #reference_tag, #reference_tagname, #relative, #render_bibliography, #render_citation, #renderer, #replace_strings?, #repository, #repository?, #repository_link_for, #repository_links_for, #repository_path, #scholar_source, #set_context_to, #skip_sort?, #sort, #sort_keys, #sort_order, #split_arguments, #style, #suppress_author?, #type_aliases, #type_names, #type_order
Constructor Details
#initialize(site, base, dir, entry) ⇒ Details
Returns a new instance of Details.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/jekyll/scholar/generators/details.rb', line 7 def initialize(site, base, dir, entry) @site, @base, @dir = site, base, dir @config = Scholar.defaults.merge(site.config['scholar'] || {}) @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 |