jekyll-scholar 6.5.1 → 6.6.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 -1
- data/Gemfile +5 -5
- data/README.md +7 -0
- data/features/bibtex.feature +1 -1
- data/features/cite_details.feature +28 -0
- data/features/filter.feature +2 -2
- data/features/support/env.rb +2 -8
- data/features/support/hooks.rb +4 -2
- data/jekyll-scholar.gemspec +0 -1
- data/lib/jekyll/scholar.rb +1 -0
- data/lib/jekyll/scholar/tags/details_link.rb +25 -0
- data/lib/jekyll/scholar/utilities.rb +8 -0
- data/lib/jekyll/scholar/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 553c6ce018f518f25bb57bd76a547da001554588f947d158db5630ca3a863294
|
4
|
+
data.tar.gz: 8e18201f73e7157d096d84447c6fc526dbe6094b8bcf4f43a407d91b780ff3b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98d42799eb2356464ef26cef26cff2de39e1e3b39352ec4bb77e41c5a70dc9fe39dafc4ad8b4fc0a261c90530ea9bc5152e5b66468c3715f422910bf96061a89
|
7
|
+
data.tar.gz: '09f0301742a895a3cb8a1d09a604715bf79034cb08f55b946bf3733999700f69d4adc537befd01f376e9bd4d06bb26891f97ef290d1023acf4083c989ba08810'
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
@@ -2,22 +2,22 @@ source 'https://rubygems.org'
|
|
2
2
|
gemspec
|
3
3
|
|
4
4
|
group :development do
|
5
|
-
gem '
|
5
|
+
gem 'cucumber'
|
6
6
|
gem 'rake'
|
7
|
+
gem 'redcarpet'
|
7
8
|
gem 'redgreen'
|
8
9
|
gem 'shoulda'
|
9
|
-
gem '
|
10
|
-
gem 'redcarpet'
|
10
|
+
gem 'test-unit'
|
11
11
|
gem 'unicode_utils' if RUBY_VERSION < '2.4'
|
12
12
|
end
|
13
13
|
|
14
14
|
group :extra do
|
15
|
-
|
15
|
+
gem 'listen'
|
16
16
|
end
|
17
17
|
|
18
18
|
group :coverage do
|
19
|
-
gem 'simplecov', :require => false
|
20
19
|
gem 'coveralls', :require => false
|
20
|
+
gem 'simplecov', :require => false
|
21
21
|
end
|
22
22
|
|
23
23
|
group :debug do
|
data/README.md
CHANGED
@@ -501,6 +501,13 @@ can be set via the 'details_link' configuration option).
|
|
501
501
|
Duis 'aute irure dolor in reprehenderit in voluptate' velit esse cillum
|
502
502
|
dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
|
503
503
|
proident {% cite_details key --text Click Here For More Details %}.
|
504
|
+
|
505
|
+
Alternatively, you can use the `details_link` tag to get just the URL to
|
506
|
+
a details page. This can be used to link to details pages in markdown the
|
507
|
+
same way you would link to a blog post with Jekyll's `link` tag.
|
508
|
+
|
509
|
+
[See our blog post]({% link _posts/2020-01-01-research-post.md %})
|
510
|
+
or [find more details]({% details_link key %}).
|
504
511
|
|
505
512
|
|
506
513
|
### Bibliography Filters
|
data/features/bibtex.feature
CHANGED
@@ -140,3 +140,31 @@ Feature: Citations
|
|
140
140
|
Then the _site directory should exist
|
141
141
|
And the "_site/scholar.html" file should exist
|
142
142
|
And I should see "Click For More</a>" in "_site/scholar.html"
|
143
|
+
|
144
|
+
@tags @details_link
|
145
|
+
Scenario: A Simple Details Link
|
146
|
+
Given I have a scholar configuration with:
|
147
|
+
| key | value |
|
148
|
+
| source | ./_bibliography |
|
149
|
+
| bibliography | my_references |
|
150
|
+
And I have a "_bibliography" directory
|
151
|
+
And I have a file "_bibliography/my_references.bib":
|
152
|
+
"""
|
153
|
+
@book{ruby,
|
154
|
+
title = {The Ruby Programming Language},
|
155
|
+
author = {Flanagan, David and Matsumoto, Yukihiro},
|
156
|
+
year = {2008},
|
157
|
+
publisher = {O'Reilly Media}
|
158
|
+
}
|
159
|
+
"""
|
160
|
+
And I have a page "scholar.html":
|
161
|
+
"""
|
162
|
+
---
|
163
|
+
---
|
164
|
+
{% details_link ruby %}
|
165
|
+
"""
|
166
|
+
When I run jekyll
|
167
|
+
Then the _site directory should exist
|
168
|
+
And the "_site/scholar.html" file should exist
|
169
|
+
And I should see "/bibliography/ruby.html" in "_site/scholar.html"
|
170
|
+
And I should not see ""<a>"" in "_site/scholar.html"
|
data/features/filter.feature
CHANGED
@@ -161,7 +161,7 @@ Feature: BibTeX
|
|
161
161
|
"""
|
162
162
|
---
|
163
163
|
---
|
164
|
-
{% bibliography %}
|
164
|
+
{% bibliography --style apa-6th-edition %}
|
165
165
|
"""
|
166
166
|
When I run jekyll
|
167
167
|
Then the _site directory should exist
|
@@ -192,7 +192,7 @@ Feature: BibTeX
|
|
192
192
|
"""
|
193
193
|
---
|
194
194
|
---
|
195
|
-
{% bibliography %}
|
195
|
+
{% bibliography --style apa-6th-edition %}
|
196
196
|
"""
|
197
197
|
When I run jekyll
|
198
198
|
Then the _site directory should exist
|
data/features/support/env.rb
CHANGED
@@ -6,16 +6,12 @@ rescue LoadError
|
|
6
6
|
end
|
7
7
|
|
8
8
|
begin
|
9
|
-
|
10
|
-
require 'byebug'
|
11
|
-
else
|
12
|
-
require 'debugger'
|
13
|
-
end
|
9
|
+
require 'byebug'
|
14
10
|
rescue LoadError
|
15
11
|
# ignore
|
16
12
|
end
|
17
13
|
|
18
|
-
require 'test
|
14
|
+
require 'minitest/test'
|
19
15
|
require 'jekyll/scholar'
|
20
16
|
require 'tmpdir'
|
21
17
|
|
@@ -32,7 +28,6 @@ def prepend_test_dir(options, key)
|
|
32
28
|
end
|
33
29
|
|
34
30
|
def run_jekyll(options = {})
|
35
|
-
|
36
31
|
options = Jekyll.configuration(options)
|
37
32
|
|
38
33
|
prepend_test_dir(options, 'source')
|
@@ -42,5 +37,4 @@ def run_jekyll(options = {})
|
|
42
37
|
print options['destination'] + "\n"
|
43
38
|
site = Jekyll::Site.new(options)
|
44
39
|
site.process
|
45
|
-
|
46
40
|
end
|
data/features/support/hooks.rb
CHANGED
data/jekyll-scholar.gemspec
CHANGED
data/lib/jekyll/scholar.rb
CHANGED
@@ -17,6 +17,7 @@ require 'jekyll/scholar/tags/bibliography_count'
|
|
17
17
|
require 'jekyll/scholar/tags/bibtex'
|
18
18
|
require 'jekyll/scholar/tags/cite'
|
19
19
|
require 'jekyll/scholar/tags/cite_details'
|
20
|
+
require 'jekyll/scholar/tags/details_link'
|
20
21
|
require 'jekyll/scholar/tags/quote'
|
21
22
|
require 'jekyll/scholar/tags/reference'
|
22
23
|
require 'jekyll/scholar/generators/details'
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module Jekyll
|
2
|
+
class Scholar
|
3
|
+
|
4
|
+
class DetailsLinkTag < Liquid::Tag
|
5
|
+
include Scholar::Utilities
|
6
|
+
|
7
|
+
def initialize(tag_name, arguments, tokens)
|
8
|
+
super
|
9
|
+
|
10
|
+
@config = Scholar.defaults.dup
|
11
|
+
@keys, arguments = split_arguments arguments
|
12
|
+
|
13
|
+
optparse(arguments)
|
14
|
+
end
|
15
|
+
|
16
|
+
def render(context)
|
17
|
+
set_context_to context
|
18
|
+
details_link keys[0]
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
Liquid::Template.register_tag('details_link', Jekyll::Scholar::DetailsLinkTag)
|
@@ -724,6 +724,14 @@ module Jekyll
|
|
724
724
|
end
|
725
725
|
end
|
726
726
|
|
727
|
+
def details_link(key)
|
728
|
+
if bibliography.key?(key)
|
729
|
+
details_link_for(bibliography[key])
|
730
|
+
else
|
731
|
+
raise Exception.new "Could not find entry for key '%s'" % key
|
732
|
+
end
|
733
|
+
end
|
734
|
+
|
727
735
|
def content_tag(name, content_or_attributes, attributes = {})
|
728
736
|
if content_or_attributes.is_a?(Hash)
|
729
737
|
content, attributes = nil, content_or_attributes
|
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: 6.
|
4
|
+
version: 6.6.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:
|
11
|
+
date: 2020-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -125,6 +125,7 @@ files:
|
|
125
125
|
- lib/jekyll/scholar/tags/bibtex.rb
|
126
126
|
- lib/jekyll/scholar/tags/cite.rb
|
127
127
|
- lib/jekyll/scholar/tags/cite_details.rb
|
128
|
+
- lib/jekyll/scholar/tags/details_link.rb
|
128
129
|
- lib/jekyll/scholar/tags/quote.rb
|
129
130
|
- lib/jekyll/scholar/tags/reference.rb
|
130
131
|
- lib/jekyll/scholar/utilities.rb
|
@@ -148,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
148
149
|
- !ruby/object:Gem::Version
|
149
150
|
version: 1.3.6
|
150
151
|
requirements: []
|
151
|
-
rubygems_version: 3.
|
152
|
+
rubygems_version: 3.1.2
|
152
153
|
signing_key:
|
153
154
|
specification_version: 4
|
154
155
|
summary: Jekyll extensions for the academic blogger.
|