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
a8d88afe
Commit
a8d88afe
authored
Mar 15, 2013
by
Sylvester Keil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add prefix feature examples for #12
parent
25c2453e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
0 deletions
+61
-0
features/bibtex.feature
features/bibtex.feature
+34
-0
features/citation.feature
features/citation.feature
+27
-0
No files found.
features/bibtex.feature
View file @
a8d88afe
...
...
@@ -123,3 +123,37 @@ Feature: BibTeX
And
the
"_site/scholar.html"
file should exist
And
I should not see
"<i>The Ruby Programming Language</i>"
in
"_site/scholar.html"
And
I should see
"<i>Smalltalk Best Practice Patterns</i>"
in
"_site/scholar.html"
@tags
@bibliography
@prefix
Scenario
:
A
Prefixed Bibliography
Given I have a scholar configuration with
:
|
key
|
value
|
|
source
|
./_bibliography
|
And
I have a
"_bibliography"
directory
And I have a file "_bibliography/references.bib"
:
"""
@book{ruby,
title = {The Ruby Programming Language},
author = {Flanagan, David and Matsumoto, Yukihiro},
year = {2008},
publisher = {O'Reilly Media}
},
@book{smalltalk,
title = {Smalltalk Best Practice Patterns},
author = {Kent Beck},
year = {1996},
publisher = {Prentice Hall}
}
"""
And I have a page "scholar.html"
:
"""
---
---
{% bibliography references prefix: a filter: @book[year <= 2000] %}
"""
When
I run jekyll
Then
the _site directory should exist
And
the
"_site/scholar.html"
file should exist
And
I should not see
"ruby"
in
"_site/scholar.html"
And
I should see
"id=\"
a-smalltalk\"" in
"_site/scholar.html"
features/citation.feature
View file @
a8d88afe
...
...
@@ -84,3 +84,30 @@ Feature: Citations
Then
the _site directory should exist
And
the
"_site/scholar.html"
file should exist
And
I should see
"<blockquote><p>We <3 Ruby</p><cite><a .*#ruby.+\(Flanagan"
in
"_site/scholar.html"
@tags
@cite
Scenario
:
A
prefixed citation
Given I have a scholar configuration with
:
|
key
|
value
|
|
source
|
./_bibliography
|
|
bibliography
|
my_references
|
And
I have a
"_bibliography"
directory
And I have a file "_bibliography/my_references.bib"
:
"""
@book{ruby,
title = {The Ruby Programming Language},
author = {Flanagan, David and Matsumoto, Yukihiro},
year = {2008},
publisher = {O'Reilly Media}
}
"""
And I have a page "scholar.html"
:
"""
---
---
{% cite ruby prefix: a %}
"""
When
I run jekyll
Then
the _site directory should exist
And
the
"_site/scholar.html"
file should exist
And
I should see
"#a-ruby"
in
"_site/scholar.html"
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