Commit 56208901 authored by Sylvester Keil's avatar Sylvester Keil

added css classes to bibliography and links

parent 2b984387
......@@ -74,4 +74,4 @@ Feature: BibTeX
When I run jekyll
Then the _site directory should exist
And the "_site/scholar.html" file should exist
And I should see "<a href=\"/bibliography/ruby.html\">" in "_site/scholar.html"
And I should see "<a[^>]+href=\"/bibliography/ruby.html\">" in "_site/scholar.html"
......@@ -15,6 +15,9 @@ module Jekyll
details_layout bibtex.html
details_link Details
bibliography_class bibliography
details_link_class details
query @*
}].freeze
......
......@@ -21,17 +21,26 @@ module Jekyll
reference = content_tag :span, reference, :id => entry.key
if generate_details?
reference << link_to(details_link_for(entry), config['details_link'])
reference << link_to(details_link_for(entry),
config['details_link'], :class => config['details_link_class'])
end
content_tag :li, reference
end
content_tag :ol, references.join("\n")
content_tag :ol, references.join("\n"), :class => config['bibliography_class']
end
end
private
def citeproc
@citeproc ||= CiteProc::Processor.new do |p|
p.style = config['style']
p.format = 'html'
p.locale = config['locale']
end
end
end
end
......
......@@ -76,6 +76,8 @@ module Jekyll
else
"(missing reference)"
end
rescue
"(#{key})"
end
def content_tag(name, content_or_attributes, attributes = {})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment