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
14b3fe22
Commit
14b3fe22
authored
Aug 03, 2012
by
rmrf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix option string argument for header
parent
e5523526
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 @
14b3fe22
...
...
@@ -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