Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
caesr-pub
jekyll-scholar-extras
Commits
9b461f8c
Commit
9b461f8c
authored
Nov 25, 2012
by
root
Committed by
Hiren Patel
Nov 25, 2012
Browse files
remove puts
parent
d4ce4c06
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
9 deletions
+21
-9
lib/jekyll/scholar/extras/bibliography_hdp.rb
lib/jekyll/scholar/extras/bibliography_hdp.rb
+16
-4
lib/jekyll/scholar/extras/extra_utils.rb
lib/jekyll/scholar/extras/extra_utils.rb
+5
-5
No files found.
lib/jekyll/scholar/extras/bibliography_hdp.rb
View file @
9b461f8c
...
...
@@ -16,7 +16,10 @@ module Jekyll
set_context_to
context
year_section
=
''
references
=
public_entries
.
map
do
|
entry
|
opts
=
[
'@*[public!=no]'
]
#references = public_entries.map do |entry|
references
=
get_entries
(
opts
).
map
do
|
entry
|
reference
=
''
ref
=
''
...
...
@@ -45,13 +48,22 @@ module Jekyll
end
if
entry
.
field?
(
:pdflink1
)
reference
<<
"<a href=
\"
"
+
entry
[
:pdflink1
].
to_s
+
"
\"
>PDF</a>"
#if config['pdf_logo']
# puts "pdf_logo"
# reference << "<img class=\"alignleft\" title=\"pdf\" src=" + config['pdf_logo'] + "alt=\"\" width=\"50\" height=\"30\" />"
# else
reference
<<
"<a href=
\"
"
+
entry
[
:pdflink1
].
to_s
+
"
\"
>PDF</a>"
# end
end
if
entry
.
field?
(
:slides
)
reference
<<
"<a href=
\"
"
+
entry
[
:slides
].
to_s
+
"
\"
>, Slides</a>"
# if config['ppt_logo']
# puts "ppt_logo"
# reference << "<img class=\"alignleft\" title=\"ppt\" src=" + config['ppt_logo'] + "alt=\"\" width=\"50\" height=\"30\" />"
# else
reference
<<
"<a href=
\"
"
+
entry
[
:slides
].
to_s
+
"
\"
>, Slides</a>"
# end
end
content_tag
:br
,
reference
...
...
lib/jekyll/scholar/extras/extra_utils.rb
View file @
9b461f8c
...
...
@@ -22,7 +22,7 @@ module Jekyll
and_list
.
each
{
|
t
|
b
=
bibliography
[
t
]
&
b
}
puts
b
.
length
#
puts b.length
unless
config
[
'sort_by'
]
==
'none'
b
.
sort_by!
{
|
e
|
e
[
config
[
'sort_by'
]].
to_s
}
...
...
@@ -36,10 +36,10 @@ module Jekyll
bart
=
bibliography
[
'@article'
]
bpub
=
bibliography
[
'@*[public!=no]'
]
b
=
bart
&
bpub
puts
b
.
class
puts
bart
.
length
puts
bpub
.
length
puts
b
.
length
#
puts b.class
#
puts bart.length
#
puts bpub.length
#
puts b.length
unless
config
[
'sort_by'
]
==
'none'
b
.
sort_by!
{
|
e
|
e
[
config
[
'sort_by'
]].
to_s
}
...
...
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