Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jekyll-scholar
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caesr-pub
jekyll-scholar
Commits
d0bd2541
Commit
d0bd2541
authored
12 years ago
by
Hiren Patel
Browse files
Options
Downloads
Patches
Plain Diff
Parameter for text in cite_details
parent
8d04c74f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/jekyll/scholar/tags/cite_details.rb
+4
-3
4 additions, 3 deletions
lib/jekyll/scholar/tags/cite_details.rb
lib/jekyll/scholar/utilities.rb
+2
-2
2 additions, 2 deletions
lib/jekyll/scholar/utilities.rb
with
6 additions
and
5 deletions
lib/jekyll/scholar/tags/cite_details.rb
+
4
−
3
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
...
...
This diff is collapsed.
Click to expand it.
lib/jekyll/scholar/utilities.rb
+
2
−
2
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment