Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
J
jekyll-scholar
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
caesr-pub
jekyll-scholar
Commits
3d6e9866
Commit
3d6e9866
authored
Aug 04, 2012
by
Sylvester Keil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improved cite details tag
parent
50b1e2d6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
6 deletions
+3
-6
lib/jekyll/scholar/tags/cite_details.rb
lib/jekyll/scholar/tags/cite_details.rb
+2
-3
lib/jekyll/scholar/utilities.rb
lib/jekyll/scholar/utilities.rb
+1
-3
No files found.
lib/jekyll/scholar/tags/cite_details.rb
View file @
3d6e9866
...
@@ -10,13 +10,12 @@ module Jekyll
...
@@ -10,13 +10,12 @@ module Jekyll
super
super
@config
=
Scholar
.
defaults
.
dup
@config
=
Scholar
.
defaults
.
dup
@key
=
arguments
.
strip
.
split
(
/\s+/
,
2
)[
0
]
@key
,
@text
=
arguments
.
strip
.
split
(
/\s+/
,
2
)
@text
=
arguments
.
strip
.
split
(
/\s+/
,
2
)[
1
]
end
end
def
render
(
context
)
def
render
(
context
)
set_context_to
context
set_context_to
context
cite_details
key
,
text
||
config
[
'details_link'
]
cite_details
key
,
text
end
end
end
end
...
...
lib/jekyll/scholar/utilities.rb
View file @
3d6e9866
...
@@ -81,10 +81,8 @@ module Jekyll
...
@@ -81,10 +81,8 @@ module Jekyll
end
end
def
cite_details
(
key
,
text
)
def
cite_details
(
key
,
text
)
entry
=
bibliography
[
key
]
if
bibliography
.
key?
(
key
)
if
bibliography
.
key?
(
key
)
link_to
details_link_for
(
entry
),
text
link_to
details_link_for
(
bibliography
[
key
]),
text
||
config
[
'details_link'
]
else
else
"(missing reference)"
"(missing reference)"
end
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