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
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
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
caesr-pub
jekyll-scholar
Commits
f9d40aa5
Commit
f9d40aa5
authored
Nov 05, 2015
by
Sylvester Keil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
expose all name fields individually to templates
fixes #112
parent
855a8826
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
features/bibtex.feature
features/bibtex.feature
+3
-4
lib/jekyll/scholar/utilities.rb
lib/jekyll/scholar/utilities.rb
+8
-0
No files found.
features/bibtex.feature
View file @
f9d40aa5
...
...
@@ -115,12 +115,12 @@ Feature: BibTeX
And
the
"_site/scholar.html"
file should exist
And
I should see
"<i>The Ruby Programming Language</i>"
in
"_site/scholar.html"
@tags
@bibliography
@config
@tags
@bibliography
@config
@template
Scenario
:
Simple Bibliography With Custom Template
Given I have a scholar configuration with
:
|
key
|
value
|
|
source
|
./_bibliography
|
|
bibliography_template
|
<abbr>{{index}}
{{entry.type}}
[{{key}}]</abbr>{{
reference
}}
|
|
bibliography_template
|
<abbr>{{index}}
{{entry.type}}
[{{key}}]</abbr>{{
entry.author_1_last
}}
|
And
I have a
"_bibliography"
directory
And I have a file "_bibliography/references.bib"
:
"""
...
...
@@ -140,8 +140,7 @@ Feature: BibTeX
When
I run jekyll
Then
the _site directory should exist
And
the
"_site/scholar.html"
file should exist
And
I should see
"<i>The Ruby Programming Language</i>"
in
"_site/scholar.html"
And
I should see
"<abbr>1 book \[ruby\]</abbr><span"
in
"_site/scholar.html"
And
I should see
"<abbr>1 book \[ruby\]</abbr>Matsumoto"
in
"_site/scholar.html"
@tags
@filter
Scenario
:
Filtered Bibliography Loaded From Default Directory
...
...
lib/jekyll/scholar/utilities.rb
View file @
f9d40aa5
...
...
@@ -325,6 +325,14 @@ module Jekyll
entry
.
fields
.
each
do
|
key
,
value
|
value
=
value
.
convert
(
*
bibtex_filters
)
unless
bibtex_filters
.
empty?
e
[
key
.
to_s
]
=
value
.
to_s
if
value
.
is_a?
(
BibTeX
::
Names
)
value
.
each
.
with_index
do
|
name
,
idx
|
name
.
each_pair
do
|
k
,
v
|
e
[
"
#{
key
}
_
#{
idx
}
_
#{
k
}
"
]
=
v
.
to_s
end
end
end
end
e
...
...
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