jekyll-scholar 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,111 +3,111 @@ Feature: Citations
3
3
  I want to reference cool papers and books from my bibliography
4
4
 
5
5
  @tags @cite
6
- Scenario: A Simple Citation
6
+ Scenario: A Simple Citation
7
7
  Given I have a scholar configuration with:
8
- | key | value |
9
- | source | ./_bibliography |
10
- | bibliography | my_references |
11
- And I have a "_bibliography" directory
12
- And I have a file "_bibliography/my_references.bib":
13
- """
14
- @book{ruby,
15
- title = {The Ruby Programming Language},
16
- author = {Flanagan, David and Matsumoto, Yukihiro},
17
- year = {2008},
18
- publisher = {O'Reilly Media}
19
- }
20
- """
21
- And I have a page "scholar.html":
22
- """
23
- ---
24
- ---
25
- {% cite ruby %}
26
- """
27
- When I run jekyll
28
- Then the _site directory should exist
29
- And the "_site/scholar.html" file should exist
30
- And I should see "Flanagan" in "_site/scholar.html"
8
+ | key | value |
9
+ | source | ./_bibliography |
10
+ | bibliography | my_references |
11
+ And I have a "_bibliography" directory
12
+ And I have a file "_bibliography/my_references.bib":
13
+ """
14
+ @book{ruby,
15
+ title = {The Ruby Programming Language},
16
+ author = {Flanagan, David and Matsumoto, Yukihiro},
17
+ year = {2008},
18
+ publisher = {O'Reilly Media}
19
+ }
20
+ """
21
+ And I have a page "scholar.html":
22
+ """
23
+ ---
24
+ ---
25
+ {% cite ruby %}
26
+ """
27
+ When I run jekyll
28
+ Then the _site directory should exist
29
+ And the "_site/scholar.html" file should exist
30
+ And I should see "Flanagan" in "_site/scholar.html"
31
31
 
32
32
  @tags @cite
33
- Scenario: Missing references
33
+ Scenario: Missing references
34
34
  Given I have a scholar configuration with:
35
- | key | value |
36
- | source | ./_bibliography |
37
- | bibliography | my_references |
38
- And I have a "_bibliography" directory
39
- And I have a file "_bibliography/my_references.bib":
40
- """
41
- @book{ruby,
42
- title = {The Ruby Programming Language},
43
- author = {Flanagan, David and Matsumoto, Yukihiro},
44
- year = {2008},
45
- publisher = {O'Reilly Media}
46
- }
47
- """
48
- And I have a page "scholar.html":
49
- """
50
- ---
51
- ---
52
- {% cite java %}
53
- """
54
- When I run jekyll
55
- Then the _site directory should exist
56
- And the "_site/scholar.html" file should exist
57
- And I should see "missing reference" in "_site/scholar.html"
35
+ | key | value |
36
+ | source | ./_bibliography |
37
+ | bibliography | my_references |
38
+ And I have a "_bibliography" directory
39
+ And I have a file "_bibliography/my_references.bib":
40
+ """
41
+ @book{ruby,
42
+ title = {The Ruby Programming Language},
43
+ author = {Flanagan, David and Matsumoto, Yukihiro},
44
+ year = {2008},
45
+ publisher = {O'Reilly Media}
46
+ }
47
+ """
48
+ And I have a page "scholar.html":
49
+ """
50
+ ---
51
+ ---
52
+ {% cite java %}
53
+ """
54
+ When I run jekyll
55
+ Then the _site directory should exist
56
+ And the "_site/scholar.html" file should exist
57
+ And I should see "missing reference" in "_site/scholar.html"
58
58
 
59
59
  @tags @quote
60
- Scenario: A Simple Block-Quote
60
+ Scenario: A Simple Block-Quote
61
61
  Given I have a scholar configuration with:
62
- | key | value |
63
- | source | ./_bibliography |
64
- | bibliography | my_references |
65
- And I have a "_bibliography" directory
66
- And I have a file "_bibliography/my_references.bib":
67
- """
68
- @book{ruby,
69
- title = {The Ruby Programming Language},
70
- author = {Flanagan, David and Matsumoto, Yukihiro},
71
- year = {2008},
72
- publisher = {O'Reilly Media}
73
- }
74
- """
75
- And I have a page "scholar.html":
76
- """
77
- ---
78
- ---
79
- {% quote ruby %}
80
- We <3 Ruby
81
- {% endquote %}
82
- """
83
- When I run jekyll
84
- Then the _site directory should exist
85
- And the "_site/scholar.html" file should exist
86
- And I should see "<blockquote><p>We <3 Ruby</p><cite><a .*#ruby.+\(Flanagan" in "_site/scholar.html"
62
+ | key | value |
63
+ | source | ./_bibliography |
64
+ | bibliography | my_references |
65
+ And I have a "_bibliography" directory
66
+ And I have a file "_bibliography/my_references.bib":
67
+ """
68
+ @book{ruby,
69
+ title = {The Ruby Programming Language},
70
+ author = {Flanagan, David and Matsumoto, Yukihiro},
71
+ year = {2008},
72
+ publisher = {O'Reilly Media}
73
+ }
74
+ """
75
+ And I have a page "scholar.html":
76
+ """
77
+ ---
78
+ ---
79
+ {% quote ruby %}
80
+ We <3 Ruby
81
+ {% endquote %}
82
+ """
83
+ When I run jekyll
84
+ Then the _site directory should exist
85
+ And the "_site/scholar.html" file should exist
86
+ And I should see "<blockquote><p>We <3 Ruby</p><cite><a .*#ruby.+\(Flanagan" in "_site/scholar.html"
87
87
 
88
88
  @tags @cite
89
- Scenario: A prefixed citation
89
+ Scenario: A prefixed citation
90
90
  Given I have a scholar configuration with:
91
- | key | value |
92
- | source | ./_bibliography |
93
- | bibliography | my_references |
94
- And I have a "_bibliography" directory
95
- And I have a file "_bibliography/my_references.bib":
96
- """
97
- @book{ruby,
98
- title = {The Ruby Programming Language},
99
- author = {Flanagan, David and Matsumoto, Yukihiro},
100
- year = {2008},
101
- publisher = {O'Reilly Media}
102
- }
103
- """
104
- And I have a page "scholar.html":
105
- """
106
- ---
107
- ---
108
- {% cite ruby --prefix a %}
109
- """
110
- When I run jekyll
111
- Then the _site directory should exist
112
- And the "_site/scholar.html" file should exist
113
- And I should see "#a-ruby" in "_site/scholar.html"
91
+ | key | value |
92
+ | source | ./_bibliography |
93
+ | bibliography | my_references |
94
+ And I have a "_bibliography" directory
95
+ And I have a file "_bibliography/my_references.bib":
96
+ """
97
+ @book{ruby,
98
+ title = {The Ruby Programming Language},
99
+ author = {Flanagan, David and Matsumoto, Yukihiro},
100
+ year = {2008},
101
+ publisher = {O'Reilly Media}
102
+ }
103
+ """
104
+ And I have a page "scholar.html":
105
+ """
106
+ ---
107
+ ---
108
+ {% cite ruby --prefix a %}
109
+ """
110
+ When I run jekyll
111
+ Then the _site directory should exist
112
+ And the "_site/scholar.html" file should exist
113
+ And I should see "#a-ruby" in "_site/scholar.html"
@@ -3,55 +3,55 @@ Feature: Citations
3
3
  I want to reference cool papers and books from my bibliography
4
4
 
5
5
  @tags @cite_details
6
- Scenario: A Simple Cite Details Link
6
+ Scenario: A Simple Cite Details Link
7
7
  Given I have a scholar configuration with:
8
- | key | value |
9
- | source | ./_bibliography |
10
- | bibliography | my_references |
11
- And I have a "_bibliography" directory
12
- And I have a file "_bibliography/my_references.bib":
13
- """
14
- @book{ruby,
15
- title = {The Ruby Programming Language},
16
- author = {Flanagan, David and Matsumoto, Yukihiro},
17
- year = {2008},
18
- publisher = {O'Reilly Media}
19
- }
20
- """
21
- And I have a page "scholar.html":
22
- """
23
- ---
24
- ---
25
- {% cite_details ruby %}
26
- """
27
- When I run jekyll
28
- Then the _site directory should exist
29
- And the "_site/scholar.html" file should exist
30
- And I should see "Details</a>" in "_site/scholar.html"
8
+ | key | value |
9
+ | source | ./_bibliography |
10
+ | bibliography | my_references |
11
+ And I have a "_bibliography" directory
12
+ And I have a file "_bibliography/my_references.bib":
13
+ """
14
+ @book{ruby,
15
+ title = {The Ruby Programming Language},
16
+ author = {Flanagan, David and Matsumoto, Yukihiro},
17
+ year = {2008},
18
+ publisher = {O'Reilly Media}
19
+ }
20
+ """
21
+ And I have a page "scholar.html":
22
+ """
23
+ ---
24
+ ---
25
+ {% cite_details ruby %}
26
+ """
27
+ When I run jekyll
28
+ Then the _site directory should exist
29
+ And the "_site/scholar.html" file should exist
30
+ And I should see "Details</a>" in "_site/scholar.html"
31
31
 
32
32
  @tags @cite_details
33
- Scenario: A Simple Cite Details Link With A Text Argument
33
+ Scenario: A Simple Cite Details Link With A Text Argument
34
34
  Given I have a scholar configuration with:
35
- | key | value |
36
- | source | ./_bibliography |
37
- | bibliography | my_references |
38
- And I have a "_bibliography" directory
39
- And I have a file "_bibliography/my_references.bib":
40
- """
41
- @book{ruby,
42
- title = {The Ruby Programming Language},
43
- author = {Flanagan, David and Matsumoto, Yukihiro},
44
- year = {2008},
45
- publisher = {O'Reilly Media}
46
- }
47
- """
48
- And I have a page "scholar.html":
49
- """
50
- ---
51
- ---
52
- {% cite_details ruby --text Click For More %}
53
- """
54
- When I run jekyll
55
- Then the _site directory should exist
56
- And the "_site/scholar.html" file should exist
57
- And I should see "Click For More</a>" in "_site/scholar.html"
35
+ | key | value |
36
+ | source | ./_bibliography |
37
+ | bibliography | my_references |
38
+ And I have a "_bibliography" directory
39
+ And I have a file "_bibliography/my_references.bib":
40
+ """
41
+ @book{ruby,
42
+ title = {The Ruby Programming Language},
43
+ author = {Flanagan, David and Matsumoto, Yukihiro},
44
+ year = {2008},
45
+ publisher = {O'Reilly Media}
46
+ }
47
+ """
48
+ And I have a page "scholar.html":
49
+ """
50
+ ---
51
+ ---
52
+ {% cite_details ruby --text Click For More %}
53
+ """
54
+ When I run jekyll
55
+ Then the _site directory should exist
56
+ And the "_site/scholar.html" file should exist
57
+ And I should see "Click For More</a>" in "_site/scholar.html"
@@ -4,74 +4,139 @@ Feature: BibTeX
4
4
  And I want Jekyll to generate detail pages for all the entries in my bibliography
5
5
 
6
6
  @generators
7
- Scenario: A bibliography with a single entry
7
+ Scenario: A bibliography with a single entry
8
8
  Given I have a scholar configuration with:
9
- | key | value |
10
- | source | ./_bibliography |
11
- | details_layout | details.html |
12
- And I have a "_bibliography" directory
13
- And I have a file "_bibliography/references.bib":
14
- """
15
- @book{ruby,
16
- title = {The Ruby Programming Language},
17
- author = {Flanagan, David and Matsumoto, Yukihiro},
18
- year = {2008},
19
- publisher = {O'Reilly Media}
20
- }
21
- """
22
- And I have a "_layouts" directory
23
- And I have a file "_layouts/details.html":
24
- """
25
- ---
26
- ---
27
- <html>
28
- <head></head>
29
- <body>
30
- {{ page.entry.title }}
31
- </body>
32
- </html>
33
- """
34
- When I run jekyll
35
- Then the _site directory should exist
36
- And the "_site/bibliography/ruby.html" file should exist
37
- And I should see "The Ruby Programming Language" in "_site/bibliography/ruby.html"
9
+ | key | value |
10
+ | source | ./_bibliography |
11
+ | details_layout | details.html |
12
+ And I have a "_bibliography" directory
13
+ And I have a file "_bibliography/references.bib":
14
+ """
15
+ @book{ruby,
16
+ title = {The Ruby Programming Language},
17
+ author = {Flanagan, David and Matsumoto, Yukihiro},
18
+ year = {2008},
19
+ publisher = {O'Reilly Media}
20
+ }
21
+ """
22
+ And I have a "_layouts" directory
23
+ And I have a file "_layouts/details.html":
24
+ """
25
+ ---
26
+ ---
27
+ <html>
28
+ <head></head>
29
+ <body>
30
+ {{ page.entry.title }}
31
+ </body>
32
+ </html>
33
+ """
34
+ When I run jekyll
35
+ Then the _site directory should exist
36
+ And the "_site/bibliography/ruby.html" file should exist
37
+ And I should see "The Ruby Programming Language" in "_site/bibliography/ruby.html"
38
+
39
+ @generators
40
+ Scenario: LaTeX conversion is applied to everything except the bibtex field
41
+ Given I have a scholar configuration with:
42
+ | key | value |
43
+ | source | ./_bibliography |
44
+ | details_layout | details.html |
45
+ And I have a "_bibliography" directory
46
+ And I have a file "_bibliography/references.bib":
47
+ """
48
+ @book{ruby,
49
+ title = {An Umlaut \"a!},
50
+ }
51
+ """
52
+ And I have a "_layouts" directory
53
+ And I have a file "_layouts/details.html":
54
+ """
55
+ ---
56
+ ---
57
+ <html>
58
+ <head></head>
59
+ <body>
60
+ Title: {{ page.entry.title }}
61
+ {{ page.entry.bibtex }}
62
+ </body>
63
+ </html>
64
+ """
65
+ When I run jekyll
66
+ Then the _site directory should exist
67
+ And the "_site/bibliography/ruby.html" file should exist
68
+ And I should see "Title: An Umlaut ä!" in "_site/bibliography/ruby.html"
69
+ And I should see "title = {An Umlaut \\\"a!}" in "_site/bibliography/ruby.html"
70
+
71
+ @generators
72
+ Scenario: LaTeX conversion can be turned off
73
+ Given I have a scholar configuration with:
74
+ | key | value |
75
+ | source | ./_bibliography |
76
+ | details_layout | details.html |
77
+ | bibtex_filters | |
78
+ And I have a "_bibliography" directory
79
+ And I have a file "_bibliography/references.bib":
80
+ """
81
+ @book{ruby,
82
+ title = {An Umlaut \"a!},
83
+ }
84
+ """
85
+ And I have a "_layouts" directory
86
+ And I have a file "_layouts/details.html":
87
+ """
88
+ ---
89
+ ---
90
+ <html>
91
+ <head></head>
92
+ <body>
93
+ Title: {{ page.entry.title }}
94
+ {{ page.entry.bibtex }}
95
+ </body>
96
+ </html>
97
+ """
98
+ When I run jekyll
99
+ Then the _site directory should exist
100
+ And the "_site/bibliography/ruby.html" file should exist
101
+ And I should see "Title: An Umlaut \\\"a!" in "_site/bibliography/ruby.html"
102
+ And I should see "title = {An Umlaut \\\"a!}" in "_site/bibliography/ruby.html"
38
103
 
39
104
  @tags @details
40
- Scenario: Links to Detail Pages are Generated Automatically
105
+ Scenario: Links to Detail Pages are Generated Automatically
41
106
  Given I have a scholar configuration with:
42
- | key | value |
43
- | source | ./_bibliography |
44
- | bibliogaphy | references |
45
- | details_layout | details.html |
46
- And I have a "_bibliography" directory
47
- And I have a file "_bibliography/references.bib":
48
- """
49
- @book{ruby,
50
- title = {The Ruby Programming Language},
51
- author = {Flanagan, David and Matsumoto, Yukihiro},
52
- year = {2008},
53
- publisher = {O'Reilly Media}
54
- }
55
- """
56
- And I have a "_layouts" directory
57
- And I have a file "_layouts/details.html":
58
- """
59
- ---
60
- ---
61
- <html>
62
- <head></head>
63
- <body>
64
- {{ page.entry.title }}
65
- </body>
66
- </html>
67
- """
68
- And I have a page "scholar.html":
69
- """
70
- ---
71
- ---
72
- {% bibliography %}
73
- """
74
- When I run jekyll
75
- Then the _site directory should exist
76
- And the "_site/scholar.html" file should exist
77
- And I should see "<a[^>]+href=\"/bibliography/ruby.html\">" in "_site/scholar.html"
107
+ | key | value |
108
+ | source | ./_bibliography |
109
+ | bibliogaphy | references |
110
+ | details_layout | details.html |
111
+ And I have a "_bibliography" directory
112
+ And I have a file "_bibliography/references.bib":
113
+ """
114
+ @book{ruby,
115
+ title = {The Ruby Programming Language},
116
+ author = {Flanagan, David and Matsumoto, Yukihiro},
117
+ year = {2008},
118
+ publisher = {O'Reilly Media}
119
+ }
120
+ """
121
+ And I have a "_layouts" directory
122
+ And I have a file "_layouts/details.html":
123
+ """
124
+ ---
125
+ ---
126
+ <html>
127
+ <head></head>
128
+ <body>
129
+ {{ page.entry.title }}
130
+ </body>
131
+ </html>
132
+ """
133
+ And I have a page "scholar.html":
134
+ """
135
+ ---
136
+ ---
137
+ {% bibliography %}
138
+ """
139
+ When I run jekyll
140
+ Then the _site directory should exist
141
+ And the "_site/scholar.html" file should exist
142
+ And I should see "<a[^>]+href=\"/bibliography/ruby.html\">" in "_site/scholar.html"