jekyll-scholar 7.1.1 → 7.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +46 -0
- data/Gemfile +1 -2
- data/README.md +1 -3
- data/Rakefile +0 -8
- data/cucumber.yml +1 -1
- data/features/details.feature +99 -0
- data/features/repository.feature +7 -7
- data/features/step_definitions/jekyll_steps.rb +1 -1
- data/features/support/env.rb +1 -2
- data/lib/jekyll/scholar/tags/bibliography.rb +1 -1
- data/lib/jekyll/scholar/utilities.rb +10 -3
- data/lib/jekyll/scholar/version.rb +1 -1
- metadata +4 -5
- data/.coveralls.yml +0 -2
- data/.travis.yml +0 -31
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a5c64ff0482f1ca07fb43024f2498088c276ecda97488b7d90374c828749712
|
4
|
+
data.tar.gz: fbc7bee4de5eb9453b4d6ee7245b2bc6cc7a6edf86b66ae9bce8c073ad4d32b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 625643f937acb714f7a8da96e621170786cd448a27e59bacac8ed9af4f6e268bf8f94de91efe7035cba1b0ddcf7f5349176e9c8946d78087517d72077ef86250
|
7
|
+
data.tar.gz: 9cbc3ca90920c3267b90b2c08be6e4a7282c6f58d49ef57c9d9f5a364bf46b9e8ac9717236cd1e5325a505640675ec3ad2a64d2387dceb9c3057c1eacdf10d2d
|
@@ -0,0 +1,46 @@
|
|
1
|
+
name: CI
|
2
|
+
on:
|
3
|
+
push:
|
4
|
+
branches: [ main ]
|
5
|
+
pull_request:
|
6
|
+
branches: [ main ]
|
7
|
+
concurrency:
|
8
|
+
group: ci-${{ github.ref }}
|
9
|
+
cancel-in-progress: true
|
10
|
+
jobs:
|
11
|
+
ci:
|
12
|
+
name: ${{ matrix.ruby-version }} ${{ matrix.friendlyName }}-${{ matrix.arch }}
|
13
|
+
runs-on: ${{ matrix.os }}
|
14
|
+
|
15
|
+
strategy:
|
16
|
+
matrix:
|
17
|
+
ruby-version:
|
18
|
+
- "2.6"
|
19
|
+
- "2.7"
|
20
|
+
- "3.0"
|
21
|
+
- "3.1"
|
22
|
+
- "3.2"
|
23
|
+
os:
|
24
|
+
- ubuntu-latest
|
25
|
+
- macos-latest
|
26
|
+
- windows-latest
|
27
|
+
arch:
|
28
|
+
- x64
|
29
|
+
include:
|
30
|
+
- os: ubuntu-latest
|
31
|
+
friendlyName: Linux
|
32
|
+
- os: macos-latest
|
33
|
+
friendlyName: macOS
|
34
|
+
- os: windows-latest
|
35
|
+
friendlyName: Windows
|
36
|
+
|
37
|
+
steps:
|
38
|
+
- name: Checkout repository
|
39
|
+
uses: actions/checkout@v3
|
40
|
+
- name: Setup Ruby and install bundle
|
41
|
+
uses: ruby/setup-ruby@v1
|
42
|
+
with:
|
43
|
+
ruby-version: ${{ matrix.ruby-version }}
|
44
|
+
bundler-cache: true
|
45
|
+
- name: Compile and run test
|
46
|
+
run: bundle exec cucumber
|
data/Gemfile
CHANGED
@@ -16,10 +16,9 @@ group :extra do
|
|
16
16
|
end
|
17
17
|
|
18
18
|
group :coverage do
|
19
|
-
gem 'coveralls', :require => false
|
20
19
|
gem 'simplecov', :require => false
|
21
20
|
end
|
22
21
|
|
23
22
|
group :debug do
|
24
|
-
gem '
|
23
|
+
gem 'debug', '>= 1.0.0', :require => false
|
25
24
|
end
|
data/README.md
CHANGED
@@ -1,14 +1,12 @@
|
|
1
1
|
Jekyll-Scholar
|
2
2
|
==============
|
3
|
+
[![CI](https://github.com/inukshuk/jekyll-scholar/actions/workflows/ci.yml/badge.svg)](https://github.com/inukshuk/jekyll-scholar/actions/workflows/ci.yml)
|
3
4
|
|
4
5
|
Jekyll-Scholar is for all the academic bloggers out there. It is a set of
|
5
6
|
extensions to [Jekyll](http://jekyllrb.com/), the awesome, blog aware, static
|
6
7
|
site generator; it formats your bibliographies and reading lists for the web
|
7
8
|
and gives your blog posts citation super-powers.
|
8
9
|
|
9
|
-
[![Build Status](https://travis-ci.org/inukshuk/jekyll-scholar.png?branch=master)](https://travis-ci.org/inukshuk/jekyll-scholar)
|
10
|
-
[![Coverage Status](https://coveralls.io/repos/inukshuk/jekyll-scholar/badge.png)](https://coveralls.io/r/inukshuk/jekyll-scholar)
|
11
|
-
|
12
10
|
Already using Jekyll-Scholar and interested to help out? Please get in touch with us if you would like to become a maintainer!
|
13
11
|
|
14
12
|
Installation
|
data/Rakefile
CHANGED
@@ -15,14 +15,6 @@ Cucumber::Rake::Task.new(:features)
|
|
15
15
|
|
16
16
|
task :default => [:features]
|
17
17
|
|
18
|
-
begin
|
19
|
-
require 'coveralls/rake/task'
|
20
|
-
Coveralls::RakeTask.new
|
21
|
-
task :test_with_coveralls => [:features, 'coveralls:push']
|
22
|
-
rescue LoadError => e
|
23
|
-
# ignore
|
24
|
-
end
|
25
|
-
|
26
18
|
task :release do |t|
|
27
19
|
system "gem build jekyll-scholar.gemspec"
|
28
20
|
system "git tag v#{Jekyll::Scholar::VERSION}"
|
data/cucumber.yml
CHANGED
@@ -1 +1 @@
|
|
1
|
-
default: --require features --color
|
1
|
+
default: --require features --color --publish-quiet
|
data/features/details.feature
CHANGED
@@ -39,6 +39,105 @@ Feature: Details
|
|
39
39
|
And I should see "The Ruby Programming Language" in "_site/bibliography/ruby.html"
|
40
40
|
And I should see "A Comment" in "_site/bibliography/ruby.html"
|
41
41
|
|
42
|
+
@generators
|
43
|
+
Scenario: A bibliography with a single entry with link
|
44
|
+
Given I have a scholar configuration with:
|
45
|
+
| key | value |
|
46
|
+
| source | ./_bibliography |
|
47
|
+
| details_layout | details.html |
|
48
|
+
| details_link | Full details |
|
49
|
+
And I have a "_bibliography" directory
|
50
|
+
And I have a file "_bibliography/references.bib":
|
51
|
+
"""
|
52
|
+
@book{ruby,
|
53
|
+
title = {The Ruby Programming Language},
|
54
|
+
author = {Flanagan, David and Matsumoto, Yukihiro},
|
55
|
+
year = {2008},
|
56
|
+
comment = {A Comment},
|
57
|
+
publisher = {O'Reilly Media}
|
58
|
+
}
|
59
|
+
"""
|
60
|
+
And I have a file "bibliography.html":
|
61
|
+
"""
|
62
|
+
---
|
63
|
+
---
|
64
|
+
<html>
|
65
|
+
<head></head>
|
66
|
+
<body>
|
67
|
+
{%bibliography%}
|
68
|
+
</body>
|
69
|
+
</html>
|
70
|
+
"""
|
71
|
+
And I have a "_layouts" directory
|
72
|
+
And I have a file "_layouts/details.html":
|
73
|
+
"""
|
74
|
+
---
|
75
|
+
---
|
76
|
+
<html>
|
77
|
+
<head></head>
|
78
|
+
<body>
|
79
|
+
{{ page.title }}
|
80
|
+
{{ page.entry.comment }}
|
81
|
+
</body>
|
82
|
+
</html>
|
83
|
+
"""
|
84
|
+
When I run jekyll
|
85
|
+
Then the _site directory should exist
|
86
|
+
And the "_site/bibliography/ruby.html" file should exist
|
87
|
+
And I should see "The Ruby Programming Language" in "_site/bibliography/ruby.html"
|
88
|
+
And I should see "A Comment" in "_site/bibliography/ruby.html"
|
89
|
+
And I should see "Full details" in "_site/bibliography.html"
|
90
|
+
|
91
|
+
@generators
|
92
|
+
Scenario: A bibliography with a single entry but no link
|
93
|
+
Given I have a scholar configuration with:
|
94
|
+
| key | value |
|
95
|
+
| source | ./_bibliography |
|
96
|
+
| details_layout | details.html |
|
97
|
+
| details_link | |
|
98
|
+
And I have a "_bibliography" directory
|
99
|
+
And I have a file "_bibliography/references.bib":
|
100
|
+
"""
|
101
|
+
@book{ruby,
|
102
|
+
title = {The Ruby Programming Language},
|
103
|
+
author = {Flanagan, David and Matsumoto, Yukihiro},
|
104
|
+
year = {2008},
|
105
|
+
comment = {A Comment},
|
106
|
+
publisher = {O'Reilly Media}
|
107
|
+
}
|
108
|
+
"""
|
109
|
+
And I have a file "bibliography.html":
|
110
|
+
"""
|
111
|
+
---
|
112
|
+
---
|
113
|
+
<html>
|
114
|
+
<head></head>
|
115
|
+
<body>
|
116
|
+
{%bibliography%}
|
117
|
+
</body>
|
118
|
+
</html>
|
119
|
+
"""
|
120
|
+
And I have a "_layouts" directory
|
121
|
+
And I have a file "_layouts/details.html":
|
122
|
+
"""
|
123
|
+
---
|
124
|
+
---
|
125
|
+
<html>
|
126
|
+
<head></head>
|
127
|
+
<body>
|
128
|
+
{{ page.title }}
|
129
|
+
{{ page.entry.comment }}
|
130
|
+
</body>
|
131
|
+
</html>
|
132
|
+
"""
|
133
|
+
When I run jekyll
|
134
|
+
Then the _site directory should exist
|
135
|
+
And the "_site/bibliography/ruby.html" file should exist
|
136
|
+
And I should see "The Ruby Programming Language" in "_site/bibliography/ruby.html"
|
137
|
+
And I should see "A Comment" in "_site/bibliography/ruby.html"
|
138
|
+
And I should not see "Full details" in "_site/bibliography.html"
|
139
|
+
|
140
|
+
|
42
141
|
@generators
|
43
142
|
Scenario: LaTeX conversion is applied to everything except the bibtex field
|
44
143
|
Given I have a scholar configuration with:
|
data/features/repository.feature
CHANGED
@@ -155,7 +155,7 @@ Feature: PDF Repository
|
|
155
155
|
| source | ./_bibliography |
|
156
156
|
| repository | papers |
|
157
157
|
| bibliography_template | bibliography |
|
158
|
-
| repository_file_delimiter | '
|
158
|
+
| repository_file_delimiter | '-' |
|
159
159
|
|
160
160
|
And I have a "_bibliography" directory
|
161
161
|
And I have a file "_bibliography/references.bib":
|
@@ -168,11 +168,11 @@ Feature: PDF Repository
|
|
168
168
|
}
|
169
169
|
"""
|
170
170
|
And I have a "papers" directory
|
171
|
-
And I have a file "papers/ruby.ref
|
171
|
+
And I have a file "papers/ruby.ref-pdf":
|
172
172
|
"""
|
173
173
|
The PDF
|
174
174
|
"""
|
175
|
-
And I have a file "papers/ruby.ref
|
175
|
+
And I have a file "papers/ruby.ref-slides.pdf":
|
176
176
|
"""
|
177
177
|
The Slides PDF
|
178
178
|
"""
|
@@ -191,11 +191,11 @@ Feature: PDF Repository
|
|
191
191
|
"""
|
192
192
|
When I run jekyll
|
193
193
|
Then the _site directory should exist
|
194
|
-
And the "_site/papers/ruby.ref
|
195
|
-
And the "_site/papers/ruby.ref
|
194
|
+
And the "_site/papers/ruby.ref-pdf" file should exist
|
195
|
+
And the "_site/papers/ruby.ref-slides.pdf" file should exist
|
196
196
|
And I should see "The Ruby Programming Language" in "_site/scholar.html"
|
197
|
-
And I should see "Link: /papers/ruby.ref
|
198
|
-
And I should see "Slides: /papers/ruby.ref
|
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
199
|
|
200
200
|
@repository
|
201
201
|
Scenario: A bibliography with a single entry and a repository with a directory
|
data/features/support/env.rb
CHANGED
@@ -61,7 +61,7 @@ module Jekyll
|
|
61
61
|
bibliography = items.compact.each_with_index.map { |entry, index|
|
62
62
|
reference = bibliography_tag(entry, index + 1)
|
63
63
|
|
64
|
-
if generate_details?
|
64
|
+
if generate_details? && generate_details_link?
|
65
65
|
reference << link_to(details_link_for(entry),
|
66
66
|
config['details_link'], :class => config['details_link_class'])
|
67
67
|
end
|
@@ -457,10 +457,10 @@ module Jekyll
|
|
457
457
|
|
458
458
|
# Return as is if it is an absolute path
|
459
459
|
# Improve by using Pathname from stdlib?
|
460
|
-
return name if name.start_with?('/') && File.
|
460
|
+
return name if name.start_with?('/') && File.exist?(name)
|
461
461
|
|
462
462
|
name = File.join scholar_source, name
|
463
|
-
name << '.bib' if File.extname(name).empty? && !File.
|
463
|
+
name << '.bib' if File.extname(name).empty? && !File.exist?(name)
|
464
464
|
name
|
465
465
|
end
|
466
466
|
|
@@ -468,7 +468,7 @@ module Jekyll
|
|
468
468
|
source = config['source']
|
469
469
|
|
470
470
|
# Improve by using Pathname from stdlib?
|
471
|
-
return source if source.start_with?('/') && File.
|
471
|
+
return source if source.start_with?('/') && File.exist?(source)
|
472
472
|
|
473
473
|
File.join site.source, source
|
474
474
|
end
|
@@ -592,6 +592,13 @@ module Jekyll
|
|
592
592
|
e
|
593
593
|
end
|
594
594
|
|
595
|
+
def generate_details_link?
|
596
|
+
if !config['details_link'] then
|
597
|
+
return false
|
598
|
+
end
|
599
|
+
return true
|
600
|
+
end
|
601
|
+
#
|
595
602
|
def generate_details?
|
596
603
|
site.layouts.key?(File.basename(config['details_layout'], '.html'))
|
597
604
|
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: 7.1.
|
4
|
+
version: 7.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sylvester Keil
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -75,10 +75,9 @@ executables: []
|
|
75
75
|
extensions: []
|
76
76
|
extra_rdoc_files: []
|
77
77
|
files:
|
78
|
-
- ".
|
78
|
+
- ".github/workflows/ci.yml"
|
79
79
|
- ".gitignore"
|
80
80
|
- ".simplecov"
|
81
|
-
- ".travis.yml"
|
82
81
|
- Gemfile
|
83
82
|
- LICENSE
|
84
83
|
- README.md
|
@@ -152,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
152
151
|
- !ruby/object:Gem::Version
|
153
152
|
version: 1.3.6
|
154
153
|
requirements: []
|
155
|
-
rubygems_version: 3.2
|
154
|
+
rubygems_version: 3.4.2
|
156
155
|
signing_key:
|
157
156
|
specification_version: 4
|
158
157
|
summary: Jekyll extensions for the academic blogger.
|
data/.coveralls.yml
DELETED
data/.travis.yml
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
sudo: false
|
3
|
-
cache: bundler
|
4
|
-
matrix:
|
5
|
-
include:
|
6
|
-
- rvm: 2.7
|
7
|
-
env: WITH_COVERALLS=true
|
8
|
-
- rvm: 2.6
|
9
|
-
env: WITH_COVERALLS=false
|
10
|
-
- rvm: 2.5
|
11
|
-
env: WITH_COVERALLS=false
|
12
|
-
- rvm: 2.4
|
13
|
-
env: WITH_COVERALLS=false
|
14
|
-
install:
|
15
|
-
- if [[ $WITH_COVERALLS = "true" ]]; then
|
16
|
-
bundle install --without debug extra;
|
17
|
-
else
|
18
|
-
bundle install --without debug extra coverage;
|
19
|
-
fi
|
20
|
-
script:
|
21
|
-
- if [[ $WITH_COVERALLS = "true" ]]; then
|
22
|
-
bundle exec rake test_with_coveralls;
|
23
|
-
else
|
24
|
-
bundle exec rake;
|
25
|
-
fi
|
26
|
-
notifications:
|
27
|
-
email:
|
28
|
-
recipients:
|
29
|
-
- sylvester@keil.or.at
|
30
|
-
on_success: change
|
31
|
-
on_failure: change
|