jekyll-scholar 4.2.3 → 4.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c282d1cefb78d0e8ca0efa4193c2b0b726636a57
4
- data.tar.gz: 7ca29583fa28f917bb1ab3fa9673456f47e2f33f
3
+ metadata.gz: ad49dc1f14b334b5134f49d75a24e73d50a79357
4
+ data.tar.gz: d2b68d9a318ca228950d0ea661890bbe68a2931a
5
5
  SHA512:
6
- metadata.gz: dc59974ef3707a2a478703279c87cdf4e5ec721dfda8550884aa8c62c872cd14e8846e8851e7372868cdd371a0750adbd54b1abd9c288dcfa6251d0764fff60c
7
- data.tar.gz: dd3fa4ef2afd97ec58e9142a9f2c0fba01184e41b56e130cb701f822b25f4f520f423557bb7ba39a11d179b0765ae1e4e454da7a603dacff792f7298d1c1cb37
6
+ metadata.gz: 8f76af59894107593462a73be48c13be140d1d5c74a221a598a8f130c26bb04eb01715bae58895263db5b152e47706117d9839e855a3bd53e031921ad260ee21
7
+ data.tar.gz: 81b501fa00aee559d13455091d272cd769ac66da2c400ff2f52383481070b4cfca159e5f0055a70d8b54b9aa2afbe47e409b22410bb5c999b172a1be09029030
data/README.md CHANGED
@@ -497,7 +497,7 @@ License
497
497
 
498
498
  Jekyll-Scholar is distributed under the same license as Jekyll.
499
499
 
500
- Copyright (c) 2011-2014 [Sylvester Keil](http://sylvester.keil.or.at/)
500
+ Copyright (c) 2011-2015 [Sylvester Keil](http://sylvester.keil.or.at/)
501
501
 
502
502
  Permission is hereby granted, free of charge, to any person obtaining a copy
503
503
  of this software and associated documentation files (the 'Software'), to deal
@@ -28,7 +28,7 @@ Gem::Specification.new do |s|
28
28
  s.add_runtime_dependency('jekyll', '~> 2.0')
29
29
  s.add_runtime_dependency('citeproc-ruby', '~> 1.0')
30
30
  s.add_runtime_dependency('csl-styles', '~> 1.0')
31
- s.add_runtime_dependency('bibtex-ruby', '~> 4.0', '>= 4.0.8')
31
+ s.add_runtime_dependency('bibtex-ruby', '~> 4.0', '>= 4.0.9')
32
32
 
33
33
  s.files = `git ls-files`.split("\n")
34
34
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
@@ -15,6 +15,7 @@ module Jekyll
15
15
 
16
16
  'bibtex_options' => { :strip => false, :parse_months => true },
17
17
  'bibtex_filters' => [ :latex ],
18
+ 'bibtex_skip_fields' => [ :abstract, :month_numeric ],
18
19
 
19
20
  'replace_strings' => true,
20
21
  'join_strings' => true,
@@ -141,10 +141,7 @@ module Jekyll
141
141
  def sort(unsorted)
142
142
  return unsorted if skip_sort?
143
143
 
144
- sorted = unsorted.sort_by { |e|
145
- e.values_at(*sort_keys).map { |v| v && v.v }
146
- }
147
-
144
+ sorted = unsorted.sort_by { |e| e.values_at(*sort_keys) }
148
145
  sorted.reverse! if config['order'] =~ /^(desc|reverse)/i
149
146
  sorted
150
147
  end
@@ -278,12 +275,16 @@ module Jekyll
278
275
  e['key'] = entry.key
279
276
  e['type'] = entry.type.to_s
280
277
 
281
- if entry.field?(:abstract)
278
+ if entry.field_names(config['bibtex_skip_fields']).empty?
279
+ e['bibtex'] = entry.to_s
280
+ else
282
281
  tmp = entry.dup
283
- tmp.delete :abstract
282
+
283
+ config['bibtex_skip_fields'].each do |name|
284
+ tmp.delete name if tmp.field?(name)
285
+ end
286
+
284
287
  e['bibtex'] = tmp.to_s
285
- else
286
- e['bibtex'] = entry.to_s
287
288
  end
288
289
 
289
290
  entry.fields.each do |key, value|
@@ -294,6 +295,9 @@ module Jekyll
294
295
  e
295
296
  end
296
297
 
298
+ def bibtex_skip_fields
299
+ end
300
+
297
301
  def generate_details?
298
302
  site.layouts.key?(File.basename(config['details_layout'], '.html'))
299
303
  end
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  class Scholar
3
- VERSION = '4.2.3'.freeze
3
+ VERSION = '4.3.0'.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: 4.2.3
4
+ version: 4.3.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: 2015-01-16 00:00:00.000000000 Z
11
+ date: 2015-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -61,7 +61,7 @@ dependencies:
61
61
  version: '4.0'
62
62
  - - ">="
63
63
  - !ruby/object:Gem::Version
64
- version: 4.0.8
64
+ version: 4.0.9
65
65
  type: :runtime
66
66
  prerelease: false
67
67
  version_requirements: !ruby/object:Gem::Requirement
@@ -71,7 +71,7 @@ dependencies:
71
71
  version: '4.0'
72
72
  - - ">="
73
73
  - !ruby/object:Gem::Version
74
- version: 4.0.8
74
+ version: 4.0.9
75
75
  description: " Jekyll-Scholar is for all the academic bloggers out there. It is a
76
76
  set of extensions for Jekyll the awesome, blog aware, static site generator; it
77
77
  formats your BibTeX bibliographies for the web using CSL citation styles and generally