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
98733791
Commit
98733791
authored
Jul 29, 2012
by
Hiren Patel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add cite_details tag
parent
3dd51beb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
1 deletion
+36
-1
lib/jekyll/scholar.rb
lib/jekyll/scholar.rb
+1
-0
lib/jekyll/scholar/tags/cite_details.rb
lib/jekyll/scholar/tags/cite_details.rb
+26
-0
lib/jekyll/scholar/utilities.rb
lib/jekyll/scholar/utilities.rb
+9
-1
No files found.
lib/jekyll/scholar.rb
View file @
98733791
...
...
@@ -11,5 +11,6 @@ require 'jekyll/scholar/utilities'
require
'jekyll/scholar/converters/bibtex'
require
'jekyll/scholar/tags/bibliography'
require
'jekyll/scholar/tags/cite'
require
'jekyll/scholar/tags/cite_details'
require
'jekyll/scholar/tags/quote'
require
'jekyll/scholar/generators/details'
lib/jekyll/scholar/tags/cite_details.rb
0 → 100644
View file @
98733791
module
Jekyll
class
Scholar
class
CiteDetailsTag
<
Liquid
::
Tag
include
Scholar
::
Utilities
attr_reader
:key
,
:pages
def
initialize
(
tag_name
,
arguments
,
tokens
)
super
@config
=
Scholar
.
defaults
.
dup
@key
=
arguments
.
strip
.
split
(
/\s+/
)[
0
]
end
def
render
(
context
)
set_context_to
context
cite_details
key
end
end
end
end
Liquid
::
Template
.
register_tag
(
'cite_details'
,
Jekyll
::
Scholar
::
CiteDetailsTag
)
lib/jekyll/scholar/utilities.rb
View file @
98733791
...
...
@@ -79,6 +79,14 @@ module Jekyll
rescue
"(
#{
key
}
)"
end
def
cite_details
(
key
)
entry
=
bibliography
[
key
]
if
bibliography
.
key?
(
key
)
link_to
"More details."
,
details_link_for
(
entry
)
end
end
def
content_tag
(
name
,
content_or_attributes
,
attributes
=
{})
if
content_or_attributes
.
is_a?
(
Hash
)
...
...
@@ -108,4 +116,4 @@ module Jekyll
end
end
end
\ No newline at end of file
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