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
d0bd2541
Commit
d0bd2541
authored
Jul 30, 2012
by
Hiren Patel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Parameter for text in cite_details
parent
8d04c74f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
lib/jekyll/scholar/tags/cite_details.rb
lib/jekyll/scholar/tags/cite_details.rb
+4
-3
lib/jekyll/scholar/utilities.rb
lib/jekyll/scholar/utilities.rb
+2
-2
No files found.
lib/jekyll/scholar/tags/cite_details.rb
View file @
d0bd2541
...
...
@@ -4,18 +4,19 @@ module Jekyll
class
CiteDetailsTag
<
Liquid
::
Tag
include
Scholar
::
Utilities
attr_reader
:key
,
:
pages
attr_reader
:key
,
:
text
def
initialize
(
tag_name
,
arguments
,
tokens
)
super
@config
=
Scholar
.
defaults
.
dup
@key
=
arguments
.
strip
.
split
(
/\s+/
)[
0
]
@key
=
arguments
.
strip
.
split
(
/\s+/
,
2
)[
0
]
@text
=
arguments
.
strip
.
split
(
/\s+/
,
2
)[
1
]
end
def
render
(
context
)
set_context_to
context
cite_details
key
cite_details
key
,
text
end
end
...
...
lib/jekyll/scholar/utilities.rb
View file @
d0bd2541
...
...
@@ -80,11 +80,11 @@ module Jekyll
"(
#{
key
}
)"
end
def
cite_details
(
key
)
def
cite_details
(
key
,
text
)
entry
=
bibliography
[
key
]
if
bibliography
.
key?
(
key
)
link_to
details_link_for
(
entry
),
"More details."
link_to
details_link_for
(
entry
),
text
else
"(missing reference)"
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