Commit e342b628 authored by Sylvester Keil's avatar Sylvester Keil

add option for string replacement

fixes #37
parent 185d21f2
......@@ -41,6 +41,8 @@ default configuration is as follows:
bibliography: references.bib
bibliography_template: "%{reference}"
replace_strings: true
details_dir: bibliography
details_layout: bibtex.html
details_link: Details
......
......@@ -13,6 +13,8 @@ module Jekyll
'bibtex_options' => { :strip => false },
'bibtex_filters' => [ :latex ],
'replace_strings' => true,
'details_dir' => 'bibliography',
'details_layout' => 'bibtex.html',
'details_link' => 'Details',
......
......@@ -56,7 +56,12 @@ module Jekyll
end
def bibliography
@bibliography ||= BibTeX.open(bibtex_path, bibtex_options)
unless @bibliography
@bibliography = BibTeX.open(bibtex_path, bibtex_options)
@bibliography.replace_strings if replace_strings?
end
@bibliography
end
def entries
......@@ -70,6 +75,10 @@ module Jekyll
b
end
def replace_strings?
config['replace_strings']
end
def cited_only?
!!@cited
end
......
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