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
5a524c5b
Commit
5a524c5b
authored
Aug 03, 2012
by
root
Committed by
Hiren Patel
Aug 03, 2012
Browse files
fix option string argument for header
parent
c795c3da
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
24 deletions
+9
-24
lib/jekyll/scholar/extras/bibliography_bytype.rb
lib/jekyll/scholar/extras/bibliography_bytype.rb
+9
-24
No files found.
lib/jekyll/scholar/extras/bibliography_bytype.rb
View file @
5a524c5b
...
...
@@ -5,23 +5,24 @@ module Jekyll
include
Scholar
::
Utilities
include
ScholarExtras
::
Utilities
attr_reader
:type
,
:header
,
:arr_args
def
initialize
(
tag_name
,
arguments
,
tokens
)
super
@config
=
Scholar
.
defaults
.
dup
@args
=
arguments
.
strip
puts
"args:"
puts
@args
.
to_s
# Check for number of arguments.
@arr_args
=
arguments
.
strip
.
split
(
/\s+/
)
@type
=
arr_args
[
0
]
@header
=
arr_args
[
1
]
end
def
render
(
context
)
set_context_to
context
year_section
=
''
opts
=
[
'@'
+
@args
,
'@*[public!=no]'
]
# puts opts.to_s
opts
=
[
'@'
+
@type
,
'@*[public!=no]'
]
#references = public_journal_entries.map do |entry|
references
=
get_entries
(
opts
).
map
do
|
entry
|
reference
=
''
ref
=
''
...
...
@@ -54,25 +55,9 @@ 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
section_header
=
"<h1>
#{
@header
}
</h1>"
references
.
insert
(
0
,
header
)
references
.
insert
(
0
,
section_
header
)
references
.
join
(
"
\n
"
)
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