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
106b07fb
Commit
106b07fb
authored
May 27, 2012
by
root
Committed by
Hiren Patel
May 27, 2012
Browse files
bytype customized
parent
0eedd740
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
15 deletions
+24
-15
lib/jekyll/scholar/extras/bibliography_bytype.rb
lib/jekyll/scholar/extras/bibliography_bytype.rb
+24
-15
No files found.
lib/jekyll/scholar/extras/bibliography_bytype.rb
View file @
106b07fb
...
...
@@ -9,15 +9,17 @@ module Jekyll
super
@config
=
Scholar
.
defaults
.
dup
@bibtex_type
=
arguments
.
strip
@args
=
arguments
.
strip
puts
@args
.
to_s
end
def
render
(
context
)
set_context_to
context
year_section
=
''
puts
bibtex_type
.
to_s
opts
=
[
'@article'
,
'@*[public!=no]'
]
opts
=
[
'@'
+
@args
,
'@*[public!=no]'
]
puts
opts
.
to_s
#references = public_journal_entries.map do |entry|
references
=
get_entries
(
opts
).
map
do
|
entry
|
reference
=
''
...
...
@@ -27,15 +29,6 @@ module Jekyll
:locale
=>
config
[
'locale'
],
:format
=>
'html'
content_tag
:span
,
ref
,
:id
=>
entry
.
key
if
entry
.
field?
(
:year
)
if
(
year_section
!=
entry
[
:year
])
reference
<<
"<h1>"
reference
<<
entry
[
:year
].
to_s
reference
<<
"</h1>"
year_section
=
entry
[
:year
]
end
end
reference
<<
ref
if
generate_details?
reference
<<
"<br />"
...
...
@@ -59,12 +52,28 @@ module Jekyll
content_tag
:br
,
reference
end
header
=
"<h1>"
case
@args
when
'book'
header
<<
"Books"
when
'article'
header
<<
"Journals"
when
'inproceedings'
header
<<
"Refereed Conferences"
when
'techreport'
header
<<
"Technical Reports"
when
'incollection'
header
<<
"In Book Chapters"
end
header
<<
"</h1>"
puts
header
references
.
insert
(
0
,
header
)
references
.
join
(
"
\n
"
)
#content_tag :ul, references.join("\n")
#content_tag :li, reference
end
end
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