jekyll-scholar 5.12.0 → 5.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +3 -15
- data/README.md +1 -1
- data/features/repository.feature +43 -0
- data/lib/jekyll/scholar/utilities.rb +8 -3
- data/lib/jekyll/scholar/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f359f44f4b469aa193816eba500f7681fc030ed23dbf766ae1ad2a8e4803eef2
|
4
|
+
data.tar.gz: 6a69cfd5619d538f8ddce416f4e1b188972823cc245933af39f96fc2413bebdc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5edcdf79e17f89ab9fe6058b88b78fa352cb81769bde7be530e57afa2cd7ea0c5e52e317bc87d55a12387dc1261a81947da04046b0f611e198461a458124b5e7
|
7
|
+
data.tar.gz: 5dfff2a5f869f20f32aab61933088f569fa9c2f67e0acf1a61dcdf254a3f64fb902db49a503d8e2f99cc7fffa42929149a14787854841145d33c3894f0859809
|
data/Gemfile
CHANGED
@@ -2,17 +2,13 @@ source 'https://rubygems.org'
|
|
2
2
|
gemspec
|
3
3
|
|
4
4
|
group :development do
|
5
|
-
|
6
|
-
gem 'test-unit'
|
7
|
-
else
|
8
|
-
gem 'minitest', '< 5.0'
|
9
|
-
end
|
10
|
-
|
5
|
+
gem 'test-unit'
|
11
6
|
gem 'rake'
|
12
7
|
gem 'redgreen', '~> 1.2'
|
13
8
|
gem 'shoulda', '~> 3.5'
|
14
9
|
gem 'cucumber', '1.3.11'
|
15
10
|
gem 'redcarpet'
|
11
|
+
gem 'unicode_utils' if RUBY_VERSION < '2.4'
|
16
12
|
end
|
17
13
|
|
18
14
|
group :extra do
|
@@ -21,17 +17,9 @@ end
|
|
21
17
|
|
22
18
|
group :coverage do
|
23
19
|
gem 'simplecov', '~>0.14', :require => false
|
24
|
-
gem 'rubinius-coverage', :platform => :rbx
|
25
20
|
gem 'coveralls', :require => false
|
26
21
|
end
|
27
22
|
|
28
23
|
group :debug do
|
29
|
-
|
30
|
-
gem 'byebug', '~>3.5', :require => false, :platform => :mri
|
31
|
-
else
|
32
|
-
gem 'debugger', '~>1.6', :require => false, :platform => [:mri_19, :mri_20]
|
33
|
-
end
|
34
|
-
|
35
|
-
gem 'rubinius-compiler', '~>2.0', :require => false, :platform => :rbx
|
36
|
-
gem 'rubinius-debugger', '~>2.0', :require => false, :platform => :rbx
|
24
|
+
gem 'byebug', '~>3.5', :require => false, :platform => :mri
|
37
25
|
end
|
data/README.md
CHANGED
@@ -73,7 +73,7 @@ description of all options and their defaults, see
|
|
73
73
|
| `sort_by` | `none` | Specifies if and how bibliography entries are sorted. Entries can be sorted on multiple fields, by using a list of keys, e.g. `year,month`. Ordering can be specified per sort level, e.g. `order: descending,ascending` will sort the years descending, but per year the months are ascending. If there are more sort keys than order directives, the last order entry is used for the remaining keys. |
|
74
74
|
| `order` | `ascending` | Specifies order bibliography entries are sorted in. Can be `ascending` or descending. Ordering can be specified per sort level, e.g. `descending,ascending` will sort in descending on the first key then ascending order on the second key. If there are more sort keys than order directives, the last order entry is used for the remaining keys. |
|
75
75
|
| `group_by` | `none` | Specifies how bibliography items are grouped. Grouping can be multi-level, e.g. `type, year` groups entries per publication type, and within those groups per year. |
|
76
|
-
| `group_order` | `ascending` | Ordering for groups is specified in the same way as the sort order. Publication types -- specified with group key `type`, can be ordered by adding `type_order` to the configuration. For example, `type_order: article,techreport` lists journal articles before technical reports. Types not mentioned in `type_order` are considered smaller than types that are mentioned. Types can be merge in one group using the `type_aliases` setting. By default `phdthesis` and `mastersthesis` are grouped as `thesis`. By using, for example, `type_aliases: { inproceedings: article}`, journal and conference articles appear in a single group. The display names for entry types are specified with `type_names`. Names for common types are provided, but they can be extended or overridden. For example, the default name for `article` is *Journal Articles*, but it can be changed to *Papers* using `type_names: { article: Papers }`. |
|
76
|
+
| `group_order` | `ascending` | Ordering for groups is specified in the same way as the sort order. Publication types -- specified with group key `type`, can be ordered by adding `type_order` to the configuration. For example, `type_order: [article,techreport]` lists journal articles before technical reports. Types not mentioned in `type_order` are considered smaller than types that are mentioned. Types can be merge in one group using the `type_aliases` setting. By default `phdthesis` and `mastersthesis` are grouped as `thesis`. By using, for example, `type_aliases: { inproceedings: article}`, journal and conference articles appear in a single group. The display names for entry types are specified with `type_names`. Names for common types are provided, but they can be extended or overridden. For example, the default name for `article` is *Journal Articles*, but it can be changed to *Papers* using `type_names: { article: Papers }`. |
|
77
77
|
| `bibtex_filters` | `latex,smallcaps,superscript` | Configures which [BibTeX-Ruby](https://github.com/inukshuk/bibtex-ruby) formatting filters values of entries should be passed through. The default `latex` filter converts LaTeX character escapes into unicode, `smallcaps` converts the `\textsc` command into a HTML `<font style=\"font-variant: small-caps\">` tag, and `superscript` which converts the `\textsuperscript` command into a HTML `<sup>` tag. |
|
78
78
|
|
79
79
|
|
data/features/repository.feature
CHANGED
@@ -246,3 +246,46 @@ Feature: PDF Repository
|
|
246
246
|
And I should see "The Ruby Programming Language" in "_site/scholar.html"
|
247
247
|
And I should see "Link: /papers.dir/ruby.pdf" in "_site/scholar.html"
|
248
248
|
And I should see "Slides: /papers.dir/ruby.slides.pdf" in "_site/scholar.html"
|
249
|
+
|
250
|
+
@repository
|
251
|
+
Scenario: A bibliography with a single entry with a complex name
|
252
|
+
Given I have a scholar configuration with:
|
253
|
+
| key | value |
|
254
|
+
| source | ./_bibliography |
|
255
|
+
| repository | papers |
|
256
|
+
| bibliography_template | bibliography |
|
257
|
+
And I have a "_bibliography" directory
|
258
|
+
And I have a file "_bibliography/references.bib":
|
259
|
+
"""
|
260
|
+
@book{test:book/ruby/Flanagan08,
|
261
|
+
title = {The Ruby Programming Language},
|
262
|
+
author = {Flanagan, David and Matsumoto, Yukihiro},
|
263
|
+
year = {2008},
|
264
|
+
publisher = {O'Reilly Media}
|
265
|
+
}
|
266
|
+
"""
|
267
|
+
And I have a "papers" directory
|
268
|
+
And I have a "papers/test_book" directory
|
269
|
+
And I have a "papers/test_book/ruby" directory
|
270
|
+
And I have a file "papers/test_book/ruby/Flanagan08.pdf":
|
271
|
+
"""
|
272
|
+
The PDF
|
273
|
+
"""
|
274
|
+
And I have a "_layouts" directory
|
275
|
+
And I have a file "_layouts/bibliography.html":
|
276
|
+
"""
|
277
|
+
---
|
278
|
+
---
|
279
|
+
{{ reference }} Link: {{ link }}
|
280
|
+
"""
|
281
|
+
And I have a page "scholar.html":
|
282
|
+
"""
|
283
|
+
---
|
284
|
+
---
|
285
|
+
{% bibliography %}
|
286
|
+
"""
|
287
|
+
When I run jekyll
|
288
|
+
Then the _site directory should exist
|
289
|
+
And the "_site/papers/test_book/ruby/Flanagan08.pdf" file should exist
|
290
|
+
And I should see "The Ruby Programming Language" in "_site/scholar.html"
|
291
|
+
And I should see "Link: /papers/test_book/ruby/Flanagan08.pdf" in "_site/scholar.html"
|
@@ -371,7 +371,8 @@ module Jekyll
|
|
371
371
|
base = Dir[site.source][0]
|
372
372
|
|
373
373
|
Dir[File.join(site.source, repository_path, '**/*')].each do |path|
|
374
|
-
parts =
|
374
|
+
parts = Pathname(path).relative_path_from(Pathname(File.join(base, repository_path)))
|
375
|
+
parts = parts.to_path.split(repository_file_delimiter, 2)
|
375
376
|
repo[parts[0]][parts[1]] =
|
376
377
|
Pathname(path).relative_path_from(Pathname(base))
|
377
378
|
end
|
@@ -570,7 +571,9 @@ module Jekyll
|
|
570
571
|
end
|
571
572
|
|
572
573
|
def repository_link_for(entry, base = base_url)
|
573
|
-
|
574
|
+
name = entry.key.to_s.dup
|
575
|
+
name.gsub!(/[:\s]+/, '_')
|
576
|
+
links = repository[name]
|
574
577
|
url = links['pdf'] || links['ps']
|
575
578
|
|
576
579
|
return unless url
|
@@ -579,7 +582,9 @@ module Jekyll
|
|
579
582
|
end
|
580
583
|
|
581
584
|
def repository_links_for(entry, base = base_url)
|
582
|
-
|
585
|
+
name = entry.key.to_s.dup
|
586
|
+
name.gsub!(/[:\s]+/, '_')
|
587
|
+
Hash[repository[name].map { |ext, url|
|
583
588
|
[ext, File.join(base, url)]
|
584
589
|
}]
|
585
590
|
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.
|
4
|
+
version: 5.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sylvester Keil
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-03-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|