Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
caesr-pub
jekyll-scholar
Commits
e342b628
Commit
e342b628
authored
Dec 30, 2013
by
Sylvester Keil
Browse files
add option for string replacement
fixes #37
parent
185d21f2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
1 deletion
+14
-1
README.md
README.md
+2
-0
lib/jekyll/scholar/defaults.rb
lib/jekyll/scholar/defaults.rb
+2
-0
lib/jekyll/scholar/utilities.rb
lib/jekyll/scholar/utilities.rb
+10
-1
No files found.
README.md
View file @
e342b628
...
...
@@ -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
...
...
lib/jekyll/scholar/defaults.rb
View file @
e342b628
...
...
@@ -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'
,
...
...
lib/jekyll/scholar/utilities.rb
View file @
e342b628
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment