jekyll-scholar 5.10.1 → 5.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 94f05ab3f1fdbb57535f5b80ce40f12121f15423
4
- data.tar.gz: 4f4f353ea37a5da9b1556a24da1ee57fe869ba06
3
+ metadata.gz: c81abf08b479f6214a99b5bc000db3e23059efaa
4
+ data.tar.gz: 743b2260e79050512fe3f8a2050ca411c856776a
5
5
  SHA512:
6
- metadata.gz: a7b53fae730e2f929a5a1a7f6c5d87976ea0d8a49911536f42746f6683ead1ce83f28d8a83c5a0618fed9f0e523b0077b811edb7a806ca23126a348a204fef26
7
- data.tar.gz: c74fe2de8eca19fece914140e3e55298c7aa561e72c165b78ed35ef04050a4aa0510089360766e2c84d32248d32a1e22457fb1aec6ad6928efd7ff472fd72c6d
6
+ metadata.gz: 0ad70149887d7aec9f41ce304d0de483ec149c5a3e405ebaa20255c11a933a6bfe9c54a4d796967935161f2818c4e6b70b6fb8336872b0861cd9d0a9fc7692e7
7
+ data.tar.gz: 3140cca84c118d7ada46c91ae48bdbd8309c930bd93375cb972c9bf678184480f5e37ccb160b2a51fb306d9b452d33e5ad39b49ab292bb0cfd5873ac0e2a8c8b
@@ -355,3 +355,130 @@ Feature: BibTeX
355
355
  Then the _site directory should exist
356
356
  And the "_site/scholar.html" file should exist
357
357
  And I should see "This is <sup>superscript text</sup> this should not be superscript \{even\} \{with \{additional\} groups\}." in "_site/scholar.html"
358
+
359
+ @tags @smallcap
360
+ Scenario: LaTeX Superscript as HTML
361
+ Given I have a scholar configuration with:
362
+ | key | value |
363
+ | source | ./_bibliography |
364
+ And I have the following BibTeX filters:
365
+ | smallcaps |
366
+ And I have a "_bibliography" directory
367
+ And I have a file "_bibliography/references.bib":
368
+ """
369
+ @misc{pickaxe,
370
+ title = {This is \textsc{smallcaps text}.}
371
+ }
372
+ """
373
+ And I have a page "scholar.html":
374
+ """
375
+ ---
376
+ ---
377
+ {% bibliography %}
378
+ """
379
+ When I run jekyll
380
+ Then the _site directory should exist
381
+ And the "_site/scholar.html" file should exist
382
+ And I should see "This is <font style=\"font-variant: small-caps\">smallcaps text</font>." in "_site/scholar.html"
383
+
384
+ @tags @smallcaps
385
+ Scenario: LaTeX Superscript with embedded LaTeX chars as HTML
386
+ Given I have a scholar configuration with:
387
+ | key | value |
388
+ | source | ./_bibliography |
389
+ And I have the following BibTeX filters:
390
+ | smallcaps |
391
+ | latex |
392
+ And I have a "_bibliography" directory
393
+ And I have a file "_bibliography/references.bib":
394
+ """
395
+ @misc{pickaxe,
396
+ title = {\textsc{\"u \"{u} \v{z}}}
397
+ }
398
+ """
399
+ And I have a page "scholar.html":
400
+ """
401
+ ---
402
+ ---
403
+ {% bibliography %}
404
+ """
405
+ When I run jekyll
406
+ Then the _site directory should exist
407
+ And the "_site/scholar.html" file should exist
408
+ And I should see "<font style=\"font-variant: small-caps\">ü ü ž</font>" in "_site/scholar.html"
409
+
410
+ @tags @smallcaps
411
+ Scenario: LaTeX Superscript as HTML with embedded LaTeX chars left untouched
412
+ Given I have a scholar configuration with:
413
+ | key | value |
414
+ | source | ./_bibliography |
415
+ And I have the following BibTeX filters:
416
+ | smallcaps |
417
+ And I have a "_bibliography" directory
418
+ And I have a file "_bibliography/references.bib":
419
+ """
420
+ @misc{pickaxe,
421
+ title = {\textsc{\"u \"{u} \v{z}}}
422
+ }
423
+ """
424
+ And I have a page "scholar.html":
425
+ """
426
+ ---
427
+ ---
428
+ {% bibliography %}
429
+ """
430
+ When I run jekyll
431
+ Then the _site directory should exist
432
+ And the "_site/scholar.html" file should exist
433
+ And I should see "<font style=\"font-variant: small-caps\">\\"u \\"\{u\} \\v\{z\}</font>" in "_site/scholar.html"
434
+
435
+ @tags @smallcaps
436
+ Scenario: LaTeX Superscript with subsequent groups as HTML
437
+ Given I have a scholar configuration with:
438
+ | key | value |
439
+ | source | ./_bibliography |
440
+ And I have the following BibTeX filters:
441
+ | smallcaps |
442
+ | latex |
443
+ And I have a "_bibliography" directory
444
+ And I have a file "_bibliography/references.bib":
445
+ """
446
+ @misc{pickaxe,
447
+ title = {This is \textsc{smallcaps text} this should not be smallcaps {even} {with {additional} groups}.}
448
+ }
449
+ """
450
+ And I have a page "scholar.html":
451
+ """
452
+ ---
453
+ ---
454
+ {% bibliography %}
455
+ """
456
+ When I run jekyll
457
+ Then the _site directory should exist
458
+ And the "_site/scholar.html" file should exist
459
+ And I should see "This is <font style=\"font-variant: small-caps\">smallcaps text</font> this should not be smallcaps even with additional groups." in "_site/scholar.html"
460
+
461
+ @tags @smallcaps
462
+ Scenario: LaTeX Superscript with subsequent groups untouched in HTML
463
+ Given I have a scholar configuration with:
464
+ | key | value |
465
+ | source | ./_bibliography |
466
+ And I have the following BibTeX filters:
467
+ | smallcaps |
468
+ And I have a "_bibliography" directory
469
+ And I have a file "_bibliography/references.bib":
470
+ """
471
+ @misc{pickaxe,
472
+ title = {This is \textsc{smallcaps text} this should not be smallcaps {even} {with {additional} groups}.}
473
+ }
474
+ """
475
+ And I have a page "scholar.html":
476
+ """
477
+ ---
478
+ ---
479
+ {% bibliography %}
480
+ """
481
+ When I run jekyll
482
+ Then the _site directory should exist
483
+ And the "_site/scholar.html" file should exist
484
+ And I should see "This is <font style=\"font-variant: small-caps\">smallcaps text</font> this should not be smallcaps \{even\} \{with \{additional\} groups\}." in "_site/scholar.html"
@@ -0,0 +1,51 @@
1
+ Feature: Bibliographies in Layouts
2
+ As a scholar who likes to blog
3
+ I want to cite references on my website
4
+ And generate bibliographies as part of a common layout
5
+
6
+ Scenario: I want every page to have cited-only references from a single bibliography
7
+ Given I have a scholar configuration with:
8
+ | key | value |
9
+ | source | ./_bibliography |
10
+ And I have a "_bibliography" directory
11
+ And I have a file "_bibliography/references.bib":
12
+ """
13
+ @book{ruby,
14
+ title = {The Ruby Programming Language},
15
+ author = {Flanagan, David and Matsumoto, Yukihiro},
16
+ year = {2008},
17
+ publisher = {O'Reilly Media}
18
+ },
19
+ @book{smalltalk,
20
+ title = {Smalltalk Best Practice Patterns},
21
+ author = {Kent Beck},
22
+ year = {1996},
23
+ publisher = {Prentice Hall}
24
+ }
25
+ """
26
+ And I have a "_layouts" directory
27
+ And I have a file "_layouts/page.html":
28
+ """
29
+ ---
30
+ ---
31
+ <div>
32
+ {{ content }}
33
+ </div>
34
+ <div>
35
+ {% bibliography --cited %}
36
+ </div>
37
+ """
38
+ And I have a page "scholar.html":
39
+ """
40
+ ---
41
+ layout: page
42
+ ---
43
+ {% cite smalltalk %}
44
+ """
45
+ When I run jekyll
46
+ Then the _site directory should exist
47
+ And the "_site/scholar.html" file should exist
48
+ And I should not see "<i>The Ruby Programming Language</i>" in "_site/scholar.html"
49
+ And I should see "<i>Smalltalk Best Practice Patterns</i>" in "_site/scholar.html"
50
+
51
+
@@ -610,7 +610,7 @@ module Jekyll
610
610
  end
611
611
 
612
612
  def cited_keys
613
- context['cited'] ||= []
613
+ context['cited'] = context.environments.first['page']['cited'] ||= []
614
614
  end
615
615
 
616
616
  def citation_number(key)
@@ -663,7 +663,7 @@ module Jekyll
663
663
  end
664
664
 
665
665
  def cited_references
666
- context && context['cited'] || []
666
+ context && cited_keys
667
667
  end
668
668
 
669
669
  def keys
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  class Scholar
3
- VERSION = '5.10.1'.freeze
3
+ VERSION = '5.10.2'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-scholar
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.10.1
4
+ version: 5.10.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sylvester Keil
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-26 00:00:00.000000000 Z
11
+ date: 2017-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -97,6 +97,7 @@ files:
97
97
  - features/details.feature
98
98
  - features/filter.feature
99
99
  - features/grouping.feature
100
+ - features/layout.feature
100
101
  - features/multiple_files.feature
101
102
  - features/reference.feature
102
103
  - features/repository.feature
@@ -142,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
142
143
  version: 1.3.6
143
144
  requirements: []
144
145
  rubyforge_project: jekyll-scholar
145
- rubygems_version: 2.6.11
146
+ rubygems_version: 2.6.12
146
147
  signing_key:
147
148
  specification_version: 4
148
149
  summary: Jekyll extensions for the academic blogger.
@@ -154,6 +155,7 @@ test_files:
154
155
  - features/details.feature
155
156
  - features/filter.feature
156
157
  - features/grouping.feature
158
+ - features/layout.feature
157
159
  - features/multiple_files.feature
158
160
  - features/reference.feature
159
161
  - features/repository.feature