Feature: BibTeX As a scholar who likes to blog I want to publish my BibTeX bibliography on my blog In order to share my awesome references with my peers @converters Scenario: Simple Bibliography Given I have a scholar configuration with: | key | value | | style | apa | And I have a page "references.bib": """ --- --- @book{ruby, title = {The Ruby Programming Language}, author = {Flanagan, David and Matsumoto, Yukihiro}, year = {2008}, publisher = {O'Reilly Media} } """ When I run jekyll Then the _site directory should exist And the "_site/references.html" file should exist And I should see "The Ruby Programming Language" in "_site/references.html" @converters Scenario: Markdown Formatted Bibliography Given I have a scholar configuration with: | key | value | | style | apa | And I have a page "references.bib": """ --- --- References ========== @book{ruby, title = {The Ruby Programming Language}, author = {Flanagan, David and Matsumoto, Yukihiro}, year = {2008}, publisher = {O'Reilly Media} } """ When I run jekyll Then I should see "]*>References" in "_site/references.html" @latex Scenario: Simple Bibliography with LaTeX directives Given I have a scholar configuration with: | key | value | | style | apa | And I have a page "references.bib": """ --- --- @misc{umlaut, title = {Look, an umlaut: \"u!}, } """ When I run jekyll Then the _site directory should exist And the "_site/references.html" file should exist And I should see "Look, an umlaut: ΓΌ!" in "_site/references.html" @tags Scenario: Simple Bibliography Loaded From Default Directory 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} } """ And I have a page "scholar.html": """ --- --- {% bibliography -f references %} """ When I run jekyll Then the _site directory should exist And the "_site/scholar.html" file should exist And I should see "The Ruby Programming Language" in "_site/scholar.html" @tags @filter Scenario: Filtered Bibliography Loaded From Default Directory 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 -f references --query @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 "The Ruby Programming Language" in "_site/scholar.html" And I should see "Smalltalk Best Practice Patterns" 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 --file references --prefix a -q @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"