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
4868c178
Commit
4868c178
authored
Sep 09, 2014
by
Sylvester Keil
Browse files
add embedded bibtex tag
fix #57
parent
120e6255
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
lib/jekyll/scholar/tags/bibtex.rb
lib/jekyll/scholar/tags/bibtex.rb
+30
-0
No files found.
lib/jekyll/scholar/tags/bibtex.rb
0 → 100644
View file @
4868c178
module
Jekyll
class
Scholar
class
BibTeXTag
<
Liquid
::
Block
include
Scholar
::
Utilities
def
initialize
(
tag_name
,
arguments
,
tokens
)
super
@config
=
Scholar
.
defaults
.
dup
@keys
,
arguments
=
split_arguments
arguments
optparse
(
arguments
)
end
def
render
(
context
)
set_context_to
context
BibTeX
.
parse
(
super
,
bibtex_options
).
map
{
|
entry
|
reference_tag
entry
}.
join
(
"
\n
"
)
end
end
end
end
Liquid
::
Template
.
register_tag
(
'bibtex'
,
Jekyll
::
Scholar
::
BibTeXTag
)
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