jekyll-scholar 4.0.1 → 4.0.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: 283d672bb247fb3d0acae3704b5b4309a25f708d
4
- data.tar.gz: 1ae644d03d9eca66381959e740b42dc5e604b79c
3
+ metadata.gz: 20b4bc03a55f59b2ff1546d6ae1932afd3e9d662
4
+ data.tar.gz: 61c9c0815aad016ee18ddbabd4937950705ea3ed
5
5
  SHA512:
6
- metadata.gz: 679b74e725f93ee3ac61667778e6324b88504eb50ea5461cb2f4778e509d5a4ccaaa43b23654100fdb24020971620241b68453603bd16a49be3c808ef3053684
7
- data.tar.gz: 421510aa6e53b425ec10c8e8e5822acce8ad07a8b05e2d029e284dfcff444e6bd3d472415454be3eb843a8a7fc53cdc733a02844140758171881c4fcc940519a
6
+ metadata.gz: cefd79645e48e268df1ef87c91a86c293af6167f68fa76307fdba20c8c9e986138cad03f5199b031d220738e3bb91aa8ac7caede94d34614726967a7c1c68ff1
7
+ data.tar.gz: e6d3dec27c119926edc628ba59c97757ed762d8aabae00e2c5e5497433977f6464b077537c15bfc293e78ba43cda9d2a149a05096dc29022d5f1d40a2003ee58
@@ -242,3 +242,38 @@ Feature: Citations
242
242
  Then the _site directory should exist
243
243
  And the "_site/scholar.html" file should exist
244
244
  And I should see "Flanagan" in "_site/scholar.html"
245
+
246
+ @tags @cite @variables @data
247
+ Scenario: A Simple Citation using liquid variables
248
+ Given I have a scholar configuration with:
249
+ | key | value |
250
+ | source | ./_bibliography |
251
+ | bibliography | my_references |
252
+ And I have a "_bibliography" directory
253
+ And I have a file "_bibliography/my_references.bib":
254
+ """
255
+ @book{ruby,
256
+ title = {The Ruby Programming Language},
257
+ author = {Flanagan, David and Matsumoto, Yukihiro},
258
+ year = {2008},
259
+ publisher = {O'Reilly Media}
260
+ }
261
+ """
262
+ And I have a "_data" directory
263
+ And I have a file "_data/covers.yml":
264
+ """
265
+ - reference: "ruby"
266
+ image: "/img/covers/cover_01.png"
267
+ """
268
+ And I have a page "scholar.html":
269
+ """
270
+ ---
271
+ ---
272
+ {% for cover in site.data.covers %}
273
+ {% cite cover.reference %}
274
+ {% endfor %}
275
+ """
276
+ When I run jekyll
277
+ Then the _site directory should exist
278
+ And the "_site/scholar.html" file should exist
279
+ And I should see "Flanagan" in "_site/scholar.html"
@@ -376,6 +376,13 @@ module Jekyll
376
376
  def set_context_to(context)
377
377
  @context, @site, = context, context.registers[:site]
378
378
  config.merge!(site.config['scholar'] || {})
379
+
380
+ # De-reference keys
381
+ keys.map! do |key|
382
+ context.send(:resolve, key) || key
383
+ end unless keys.nil?
384
+
385
+ self
379
386
  end
380
387
  end
381
388
 
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  class Scholar
3
- VERSION = '4.0.1'.freeze
3
+ VERSION = '4.0.2'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-scholar
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.1
4
+ version: 4.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sylvester Keil