nanoc-conref-fs 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/nanoc-conref-fs/conref-fs.rb +10 -4
- data/nanoc-conref-fs.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 643c54357fd0361c0123a9d722ba4894e62d5f55
|
4
|
+
data.tar.gz: 1ce617281d9e1f819fb0b2f4f6c0df22975eee2d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5748f945fe9a5a3472c6755b94bf9834517b3d939e5311fd736d9fe87cfed447cdf5ce79d7e0484398bb7db844187d81cd2a411a45bf45666db7bf10fb30b69b
|
7
|
+
data.tar.gz: 485936ca60828db60518f2f12f8796b8dab8532cb0e2cb0e19a69478afe4777e7e5e377ae51818a40997abc4192f386f919a3b5e26fe2d68d440480289abbcb4
|
@@ -31,7 +31,6 @@ class ConrefFS < Nanoc::DataSource
|
|
31
31
|
|
32
32
|
def self.apply_attributes(config, item, rep)
|
33
33
|
page_vars = NanocConrefFS::Conrefifier.file_variables(config[:page_variables], item[:filename], rep)
|
34
|
-
|
35
34
|
frontmatter_vars = { :page => page_vars }.merge(NanocConrefFS::Variables.variables[rep])
|
36
35
|
|
37
36
|
unless page_vars[:data_association].nil?
|
@@ -47,10 +46,17 @@ class ConrefFS < Nanoc::DataSource
|
|
47
46
|
|
48
47
|
item.attributes.each_pair do |key, value|
|
49
48
|
if value.is_a?(Array)
|
50
|
-
|
51
|
-
|
52
|
-
|
49
|
+
frontmatter = []
|
50
|
+
# tried to do this with `map` and it completely erased the attributes
|
51
|
+
# array; not sure why
|
52
|
+
value.each do |v|
|
53
|
+
frontmatter << if v =~ NanocConrefFS::Conrefifier::SINGLE_SUB
|
54
|
+
NanocConrefFS::Conrefifier.apply_liquid(v, frontmatter_vars)
|
55
|
+
else
|
56
|
+
v
|
57
|
+
end
|
53
58
|
end
|
59
|
+
item[key] = frontmatter
|
54
60
|
else
|
55
61
|
if value =~ NanocConrefFS::Conrefifier::SINGLE_SUB
|
56
62
|
value = NanocConrefFS::Conrefifier.apply_liquid(value, frontmatter_vars)
|
data/nanoc-conref-fs.gemspec
CHANGED
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |spec|
|
5
5
|
spec.name = 'nanoc-conref-fs'
|
6
|
-
spec.version = '0.6.
|
6
|
+
spec.version = '0.6.1'
|
7
7
|
spec.authors = ['Garen Torikian']
|
8
8
|
spec.email = ['gjtorikian@gmail.com']
|
9
9
|
spec.summary = 'A Nanoc filesystem to permit using conrefs/reusables in your content.'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nanoc-conref-fs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Garen Torikian
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nanoc
|