jekyll-scholar 5.16.0 → 6.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -3
- data/README.md +0 -1
- data/features/bibtex.feature +0 -24
- data/features/cite_details.feature +3 -3
- data/features/details.feature +1 -3
- data/jekyll-scholar.gemspec +1 -1
- data/lib/jekyll/scholar/defaults.rb +0 -1
- data/lib/jekyll/scholar/generators/details.rb +6 -0
- data/lib/jekyll/scholar/utilities.rb +0 -8
- data/lib/jekyll/scholar/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 94307a6c3530173b6aad5787e9bc082d03866975328f7b8748ff2b9c1f98ba97
|
4
|
+
data.tar.gz: 230a279b3dbd2b8f8a560c44ae66f379868ecfb6ad502c65d9f5e23da63e82e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aaa2c2387b5cc5bb84b7c7e46530660dd0e62cab2f8215a759e2e30a390e8bf4a574ebf7fb08c9deae12ad8bffdd00f341f47b845dc42aa1347978b7e3ce33a2
|
7
|
+
data.tar.gz: 883927a2c01f6520f5d994bbd4fe0118e8189b4d799d42b801e508ee5fd74829bc97ca8a0e2b02af0369a0295102606069807e7c321d7551f3b932cf4ea4f2eb
|
data/.travis.yml
CHANGED
@@ -3,11 +3,11 @@ sudo: false
|
|
3
3
|
cache: bundler
|
4
4
|
matrix:
|
5
5
|
include:
|
6
|
-
- rvm: 2.
|
6
|
+
- rvm: 2.6
|
7
7
|
env: WITH_COVERALLS=true
|
8
|
-
- rvm: 2.
|
8
|
+
- rvm: 2.5
|
9
9
|
env: WITH_COVERALLS=false
|
10
|
-
- rvm: 2.
|
10
|
+
- rvm: 2.4
|
11
11
|
env: WITH_COVERALLS=false
|
12
12
|
install:
|
13
13
|
- if [[ $WITH_COVERALLS = "true" ]]; then
|
data/README.md
CHANGED
@@ -68,7 +68,6 @@ description of all options and their defaults, see
|
|
68
68
|
| `locale` | `en` | Defines what language to use when formatting your references (this typically applies to localized terms, e.g., 'Eds.' for editors in English). |
|
69
69
|
| `source` | `./_bibliography` | Indicates where your bibliographies are stored. |
|
70
70
|
| `bibliography` | `references.bib` | Indicates the name of your default bibliography. For best results, please ensure that your bibliography is encoded as ASCII or UTF-8. A string that contains a `*` will be passed to `Dir::glob`, so `**/*.bib{,tex}` will find all files named `*.bib` and `*.bibtex` under `source`. |
|
71
|
-
| `use_raw_bibtex_entry` | `true` | When `true`, disables parsing of Liquid tags embedded in the Bibtex fields. This option provides a way to circumvent the problem that (the conflicting syntax of) the double braces functionality of BibTex is accidentally parsed by Liquid, while it was intended to keep the exact capitalization style. |
|
72
71
|
| `allow_locale_overrides` | `false` | When `true`, allows the `language` entry in the BibTex to override the `locale` setting for individual entries. When the language is missing it will revert back to `locale`. The language value should be encoded using the two-letter [ISO 639-1](https://www.loc.gov/standards/iso639-2/php/code_list.php) standard. Ex. English = 'en', Spanish = 'es'. |
|
73
72
|
| `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
73
|
| `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. |
|
data/features/bibtex.feature
CHANGED
@@ -471,30 +471,6 @@ Feature: BibTeX
|
|
471
471
|
And the "_site/scholar.html" file should exist
|
472
472
|
And I should see "<i>The Ruby Programming Language</i>. O’Reilly Media, 2008" in "_site/scholar.html"
|
473
473
|
|
474
|
-
@tags @bibliography @config @template
|
475
|
-
Scenario: Raw bibtex template
|
476
|
-
Given I have a scholar configuration with:
|
477
|
-
| key | value |
|
478
|
-
| bibliography_template | "{{entry.bibtex}}" |
|
479
|
-
| use_raw_bibtex_entry | true |
|
480
|
-
And I have a "_bibliography" directory
|
481
|
-
And I have a file "_bibliography/references.bib":
|
482
|
-
"""
|
483
|
-
@book{ruby,
|
484
|
-
title = {The Ruby Programming Language}
|
485
|
-
}
|
486
|
-
"""
|
487
|
-
And I have a page "scholar.html":
|
488
|
-
"""
|
489
|
-
---
|
490
|
-
---
|
491
|
-
{% bibliography -f references %}
|
492
|
-
"""
|
493
|
-
When I run jekyll
|
494
|
-
Then the _site directory should exist
|
495
|
-
And the "_site/scholar.html" file should exist
|
496
|
-
And I should not see "{%[\w*]raw[\w*]%}" in "_site/scholar.html"
|
497
|
-
|
498
474
|
@config @bibliography @style
|
499
475
|
Scenario: A custom style with Jekyll source directory set
|
500
476
|
Given I have a configuration file with:
|
@@ -86,7 +86,7 @@ Feature: Citations
|
|
86
86
|
And I should not see "ab" in "_site/bibliography/a.html"
|
87
87
|
|
88
88
|
@tags @bibliography @config @template @cite_details
|
89
|
-
Scenario: Raw bibtex template in details page
|
89
|
+
Scenario: Raw bibtex template in details page with ignored option
|
90
90
|
Given I have a scholar configuration with:
|
91
91
|
| key | value |
|
92
92
|
| source | ./_bibliography |
|
@@ -111,8 +111,8 @@ Feature: Citations
|
|
111
111
|
Then the _site directory should exist
|
112
112
|
|
113
113
|
And the "_site/bibliography/a.html" file should exist
|
114
|
-
And I should
|
115
|
-
And I should see "ab" in "_site/bibliography/a.html"
|
114
|
+
And I should see "{{'b' | prepend: 'a'}}" in "_site/bibliography/a.html"
|
115
|
+
And I should not see "ab" in "_site/bibliography/a.html"
|
116
116
|
|
117
117
|
@tags @cite_details
|
118
118
|
Scenario: A Simple Cite Details Link With A Text Argument
|
data/features/details.feature
CHANGED
@@ -110,13 +110,12 @@ Feature: Details
|
|
110
110
|
|
111
111
|
|
112
112
|
@generators
|
113
|
-
Scenario:
|
113
|
+
Scenario: Liquid tags should not be parsed inside the bibtex
|
114
114
|
Given I have a scholar configuration with:
|
115
115
|
| key | value |
|
116
116
|
| source | ./_bibliography |
|
117
117
|
| details_layout | details.html |
|
118
118
|
| bibtex_filters | |
|
119
|
-
| use_raw_bibtex_entry | true |
|
120
119
|
And I have a "_bibliography" directory
|
121
120
|
And I have a file "_bibliography/references.bib":
|
122
121
|
"""
|
@@ -152,7 +151,6 @@ Feature: Details
|
|
152
151
|
When I run jekyll
|
153
152
|
Then the _site directory should exist
|
154
153
|
And the "_site/bibliography/sdf.html" file should exist
|
155
|
-
And I should not see "{%raw%}" in "_site/bibliography/sdf.html"
|
156
154
|
And I should see "SDF\^3" in "_site/bibliography/sdf.html"
|
157
155
|
|
158
156
|
@tags @details
|
data/jekyll-scholar.gemspec
CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |s|
|
|
25
25
|
s.required_rubygems_version = '>= 1.3.6'
|
26
26
|
s.rubyforge_project = s.name
|
27
27
|
|
28
|
-
s.add_runtime_dependency('jekyll', '~>
|
28
|
+
s.add_runtime_dependency('jekyll', '~> 4.0')
|
29
29
|
s.add_runtime_dependency('citeproc-ruby', '~> 1.0')
|
30
30
|
s.add_runtime_dependency('csl-styles', '~> 1.0')
|
31
31
|
s.add_runtime_dependency('bibtex-ruby', '~> 4.0', '>= 4.0.13')
|
@@ -62,7 +62,6 @@ module Jekyll
|
|
62
62
|
# Template parameters can also include any key defined in the bibtex file, e.g. ":year", ":title", etc.
|
63
63
|
# Bibtex keys such as 'title' are slugified in the same way as Jekyll treats blog post titles.
|
64
64
|
'details_permalink' => '/:details_dir/:key:extension',
|
65
|
-
'use_raw_bibtex_entry' => true,
|
66
65
|
|
67
66
|
'bibliography_class' => 'bibliography',
|
68
67
|
'bibliography_template' => '{{reference}}',
|
@@ -38,6 +38,12 @@ module Jekyll
|
|
38
38
|
def generate(site)
|
39
39
|
@site, @config = site, Scholar.defaults.merge(site.config['scholar'] || {})
|
40
40
|
|
41
|
+
# Check for removed option and warn if it is set
|
42
|
+
if @config.include? 'use_raw_bibtex_entry'
|
43
|
+
Jekyll.logger.warn('Jekyll-scholar:',
|
44
|
+
'Option `use_raw_bibtex_entry` is no longer supported')
|
45
|
+
end
|
46
|
+
|
41
47
|
if generate_details?
|
42
48
|
entries.each do |entry|
|
43
49
|
details = Details.new(site, site.source, File.join('', details_path), entry)
|
@@ -356,10 +356,6 @@ module Jekyll
|
|
356
356
|
!!@suppress_author
|
357
357
|
end
|
358
358
|
|
359
|
-
def raw_bibtex?
|
360
|
-
config['use_raw_bibtex_entry']
|
361
|
-
end
|
362
|
-
|
363
359
|
def repository?
|
364
360
|
!config['repository'].nil? && !config['repository'].empty?
|
365
361
|
end
|
@@ -535,10 +531,6 @@ module Jekyll
|
|
535
531
|
e['bibtex'] = tmp.to_s({ quotes: config['bibtex_quotes'] })
|
536
532
|
end
|
537
533
|
|
538
|
-
if raw_bibtex?
|
539
|
-
e['bibtex'] = "{%raw%}#{e['bibtex']}{%endraw%}"
|
540
|
-
end
|
541
|
-
|
542
534
|
entry.fields.each do |key, value|
|
543
535
|
value = value.convert(*bibtex_filters) unless bibtex_filters.empty?
|
544
536
|
e[key.to_s] = value.to_s
|
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:
|
4
|
+
version: 6.0.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: 2019-08-
|
11
|
+
date: 2019-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '4.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '4.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: citeproc-ruby
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -149,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
149
149
|
- !ruby/object:Gem::Version
|
150
150
|
version: 1.3.6
|
151
151
|
requirements: []
|
152
|
-
rubygems_version: 3.0.
|
152
|
+
rubygems_version: 3.0.6
|
153
153
|
signing_key:
|
154
154
|
specification_version: 4
|
155
155
|
summary: Jekyll extensions for the academic blogger.
|