Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
caesr-pub
jekyll-scholar
Commits
3d6e9866
Commit
3d6e9866
authored
Aug 04, 2012
by
Sylvester Keil
Browse files
improved cite details tag
parent
50b1e2d6
Changes
2
Hide whitespace changes
Inline
Side-by-side
lib/jekyll/scholar/tags/cite_details.rb
View file @
3d6e9866
...
...
@@ -10,13 +10,12 @@ module Jekyll
super
@config
=
Scholar
.
defaults
.
dup
@key
=
arguments
.
strip
.
split
(
/\s+/
,
2
)[
0
]
@text
=
arguments
.
strip
.
split
(
/\s+/
,
2
)[
1
]
@key
,
@text
=
arguments
.
strip
.
split
(
/\s+/
,
2
)
end
def
render
(
context
)
set_context_to
context
cite_details
key
,
text
||
config
[
'details_link'
]
cite_details
key
,
text
end
end
...
...
lib/jekyll/scholar/utilities.rb
View file @
3d6e9866
...
...
@@ -81,10 +81,8 @@ module Jekyll
end
def
cite_details
(
key
,
text
)
entry
=
bibliography
[
key
]
if
bibliography
.
key?
(
key
)
link_to
details_link_for
(
entry
),
text
link_to
details_link_for
(
bibliography
[
key
]),
text
||
config
[
'details_link'
]
else
"(missing reference)"
end
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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