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
7f615244
Commit
7f615244
authored
May 27, 2012
by
Hiren Patel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bytype customized
parent
06f0f03e
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 @
7f615244
...
...
@@ -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