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.
- #url ⇒ Object
Methods included from Utilities
#allow_locale_overrides?, #base_url, #bibliography, #bibliography_list_tag, #bibliography_stale?, #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_entries, #cited_keys, #cited_only?, #cited_references, #clear?, #content_tag, #csl_renderer, #details_link, #details_link_for, #details_path, #details_path_for, #entries, #extend_path, #generate_details?, #generate_details_link?, #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, #load_style, #locales, #locators, #match_fields, #missing_reference, #month_names, #nocite, #optparse, #query, #raw_bibtex_filters, #reference_data, #reference_tag, #reference_tagname, #relative, #remove_duplicates?, #render_bibliography, #render_citation, #replace_strings?, #repository, #repository?, #repository_file_delimiter, #repository_link_for, #repository_links_for, #repository_path, #scholar_source, #set_context_to, #skip_sort?, #sort, #sort_keys, #sort_order, #split_arguments, #style, #styles, #suppress_author?, #type_aliases, #type_names, #type_order, #update_dependency_tree
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 21 22 |
# 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 |
Instance Method Details
#url ⇒ Object
24 25 26 27 |
# 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 |