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-extras
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
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
caesr-pub
jekyll-scholar-extras
Commits
237d9813
Commit
237d9813
authored
Feb 28, 2017
by
rmrf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add button for code
parent
be36941f
Pipeline
#31425
passed with stages
in 1 minute and 16 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
lib/jekyll/scholar/extras/bibliography_bytype.rb
lib/jekyll/scholar/extras/bibliography_bytype.rb
+7
-0
lib/jekyll/scholar/extras/bibliography_year.rb
lib/jekyll/scholar/extras/bibliography_year.rb
+8
-0
No files found.
lib/jekyll/scholar/extras/bibliography_bytype.rb
View file @
237d9813
...
...
@@ -108,6 +108,13 @@ module Jekyll
end
# Is there a link for code
if
entry
.
field?
(
:code
)
code_url
=
"<div class=
\"
pure-button csl-slides
\"
><a href=
\"
"
+
entry
.
code
.
to_s
+
"
\"
>CODE</a></div>"
puts
"Found code: "
+
entry
.
code
.
to_s
reference
.
insert
(
reference
.
rindex
(
'</div>'
),
code_url
.
to_s
)
end
content_tag
config
[
'bibliography_item_tag'
],
reference
content_tag
"li class=
\"
"
+
render_ref_img
(
entry
)
+
"
\"
"
,
reference
}.
join
(
"
\n
"
)
...
...
lib/jekyll/scholar/extras/bibliography_year.rb
View file @
237d9813
...
...
@@ -132,6 +132,14 @@ module Jekyll
end
end
# Is there a link for code
if
entry
.
field?
(
:code
)
code_url
=
"<div class=
\"
pure-button csl-slides
\"
><a href=
\"
"
+
entry
.
code
.
to_s
+
"
\"
>CODE</a></div>"
puts
"Found code: "
+
entry
.
code
.
to_s
reference
.
insert
(
reference
.
rindex
(
'</div>'
),
code_url
.
to_s
)
end
end
# Content tag is dependent on type of article.
...
...
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