jekyll-scholar 5.9.0 → 5.9.1

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: aa155858171a28430fabd6809b18b61b34afae48
4
- data.tar.gz: 5b92a94a4abedb754108a1b8f5d7bdd5da7b5cdf
3
+ metadata.gz: 8414581a958ce3712c77dd03c19d972b905d2d6d
4
+ data.tar.gz: fa222ae2ff01bb4f0aa94622fe693ab41ac2cad8
5
5
  SHA512:
6
- metadata.gz: e72d369a92f0be6a3cbd7e931149b365437bc204a5d19b046fb987fbd0122e6f048fc8471f5bb3910328f325f2a51153869dc6cde4d2ae84b3c87dc7aa552344
7
- data.tar.gz: 8f31ed291d15017d72d5d3772ff6aee88e90e73195ae971c62973f082ebf7662edc87ba0a6c0bb2cbce7d1a0ce8d75c774185d63960bb73125f97a148706dc0c
6
+ metadata.gz: 1b2826bab8059be09db7a90f6479aa746b1d8b847fedf8276765f2431c055173327be9eeda4636609a1ea129d534111d81dc48740c0f9bae77170944ee4a70f0
7
+ data.tar.gz: '0971344cec58a854b6ff2a8c52f58e242a881f061731e7481fb062bbd9e15ae33d2c4eb9972d4a4c1a44077904fa97b650921686f6f7f01099abf7d4e36b71dd'
data/README.md CHANGED
@@ -433,6 +433,14 @@ to link to supporting material in a ZIP archive:
433
433
 
434
434
  {{ reference }} [<a href="{{links.zip}}">Supporting Materials</a>]
435
435
 
436
+ Since version 5.9.0, Jekyll-Scholar matches files which begin with a BibTeX key
437
+ and are immediately followed by a delimiter (default: "."). All text proceeding
438
+ the delimiter is treated as the file extension. For example, if two files named
439
+ `key.pdf` and `key.slides.pdf` are found, `{{links.pdf}}` and
440
+ `{{links['slides.pdf']}}` will both be populated. You can use the configuration
441
+ option `repository_file_delimiter` to change the default delimiter.
442
+
443
+
436
444
  ### Detail Pages
437
445
 
438
446
  If your layouts directory contains a layout file for bibliography details
@@ -106,7 +106,6 @@ Feature: PDF Repository
106
106
  | source | ./_bibliography |
107
107
  | repository | papers |
108
108
  | bibliography_template | bibliography |
109
- | file_delimit | '.' |
110
109
 
111
110
  And I have a "_bibliography" directory
112
111
  And I have a file "_bibliography/references.bib":
@@ -147,3 +146,103 @@ Feature: PDF Repository
147
146
  And I should see "The Ruby Programming Language" in "_site/scholar.html"
148
147
  And I should see "Link: /papers/ruby.pdf" in "_site/scholar.html"
149
148
  And I should see "Slides: /papers/ruby.slides.pdf" in "_site/scholar.html"
149
+
150
+ @repository
151
+ Scenario: A bibliography with a single entry and a repository with slides pdf
152
+ using a custom delimiter
153
+ Given I have a scholar configuration with:
154
+ | key | value |
155
+ | source | ./_bibliography |
156
+ | repository | papers |
157
+ | bibliography_template | bibliography |
158
+ | repository_file_delimiter | ':' |
159
+
160
+ And I have a "_bibliography" directory
161
+ And I have a file "_bibliography/references.bib":
162
+ """
163
+ @book{ruby.ref,
164
+ title = {The Ruby Programming Language},
165
+ author = {Flanagan, David and Matsumoto, Yukihiro},
166
+ year = {2008},
167
+ publisher = {O'Reilly Media}
168
+ }
169
+ """
170
+ And I have a "papers" directory
171
+ And I have a file "papers/ruby.ref:pdf":
172
+ """
173
+ The PDF
174
+ """
175
+ And I have a file "papers/ruby.ref:slides.pdf":
176
+ """
177
+ The Slides PDF
178
+ """
179
+ And I have a "_layouts" directory
180
+ And I have a file "_layouts/bibliography.html":
181
+ """
182
+ ---
183
+ ---
184
+ {{ reference }} Link: {{ link }} Slides: {{ links['slides.pdf'] }}
185
+ """
186
+ And I have a page "scholar.html":
187
+ """
188
+ ---
189
+ ---
190
+ {% bibliography %}
191
+ """
192
+ When I run jekyll
193
+ Then the _site directory should exist
194
+ And the "_site/papers/ruby.ref:pdf" file should exist
195
+ And the "_site/papers/ruby.ref:slides.pdf" file should exist
196
+ And I should see "The Ruby Programming Language" in "_site/scholar.html"
197
+ And I should see "Link: /papers/ruby.ref:pdf" in "_site/scholar.html"
198
+ And I should see "Slides: /papers/ruby.ref:slides.pdf" in "_site/scholar.html"
199
+
200
+ @repository
201
+ Scenario: A bibliography with a single entry and a repository with a directory
202
+ named using the delimiter with slides pdf
203
+ Given I have a scholar configuration with:
204
+ | key | value |
205
+ | source | ./_bibliography |
206
+ | repository | papers.dir |
207
+ | bibliography_template | bibliography |
208
+ | repository_file_delimiter | '.' |
209
+
210
+ And I have a "_bibliography" directory
211
+ And I have a file "_bibliography/references.bib":
212
+ """
213
+ @book{ruby,
214
+ title = {The Ruby Programming Language},
215
+ author = {Flanagan, David and Matsumoto, Yukihiro},
216
+ year = {2008},
217
+ publisher = {O'Reilly Media}
218
+ }
219
+ """
220
+ And I have a "papers.dir" directory
221
+ And I have a file "papers.dir/ruby.pdf":
222
+ """
223
+ The PDF
224
+ """
225
+ And I have a file "papers.dir/ruby.slides.pdf":
226
+ """
227
+ The Slides PDF
228
+ """
229
+ And I have a "_layouts" directory
230
+ And I have a file "_layouts/bibliography.html":
231
+ """
232
+ ---
233
+ ---
234
+ {{ reference }} Link: {{ link }} Slides: {{ links['slides.pdf'] }}
235
+ """
236
+ And I have a page "scholar.html":
237
+ """
238
+ ---
239
+ ---
240
+ {% bibliography %}
241
+ """
242
+ When I run jekyll
243
+ Then the _site directory should exist
244
+ And the "_site/papers.dir/ruby.pdf" file should exist
245
+ And the "_site/papers.dir/ruby.slides.pdf" file should exist
246
+ And I should see "The Ruby Programming Language" in "_site/scholar.html"
247
+ And I should see "Link: /papers.dir/ruby.pdf" in "_site/scholar.html"
248
+ And I should see "Slides: /papers.dir/ruby.slides.pdf" in "_site/scholar.html"
@@ -353,8 +353,8 @@ module Jekyll
353
353
  base = Dir[site.source][0]
354
354
 
355
355
  Dir[File.join(site.source, repository_path, '**/*')].each do |path|
356
- parts = path.split(repository_file_delimiter, 2)
357
- repo[File.basename(parts[0])][parts[1]] =
356
+ parts = File.basename(path).split(repository_file_delimiter, 2)
357
+ repo[parts[0]][parts[1]] =
358
358
  Pathname(path).relative_path_from(Pathname(base))
359
359
  end
360
360
 
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  class Scholar
3
- VERSION = '5.9.0'.freeze
3
+ VERSION = '5.9.1'.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.9.0
4
+ version: 5.9.1
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-01-24 00:00:00.000000000 Z
11
+ date: 2017-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll