octopress-ink 1.0.0.alpha.41 → 1.0.0.alpha.42
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ea8a006600a51e0bfc3c4816f20da55e849d52a
|
4
|
+
data.tar.gz: 5a4e760a5f58d4225bced80fd31d57f80c904683
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 188cec7106b750e62cd193bb5c54fea9965c3733b5854ab02a30562ea00ae3cb1867eccaf78ba9814f4f8156ef4e7d1c273adbb21b130cefa3152a77c1b9aadc
|
7
|
+
data.tar.gz: 84967eb34ce31062e3699c6f9a4009cbbc8146db0da74d9be6d1372773a0fe7b371017eddbe7b0f19e4b060e10358c764da078b1ddf11d4552f75496719d431e
|
@@ -41,8 +41,9 @@ module Octopress
|
|
41
41
|
@page.data['plugin'] = {
|
42
42
|
'name' => @plugin.name,
|
43
43
|
'slug' => @plugin.slug,
|
44
|
-
'docs_base_path' => plugin.docs_base_path
|
44
|
+
'docs_base_path' => plugin.docs_base_path,
|
45
45
|
}
|
46
|
+
@page.data['dir'] = File.dirname(plugin_path)
|
46
47
|
@page.data['doc_pages'] = @plugin.doc_pages
|
47
48
|
@page
|
48
49
|
end
|
@@ -23,10 +23,15 @@ module Octopress
|
|
23
23
|
def self.expand(file, context)
|
24
24
|
root = context.registers[:site].source
|
25
25
|
|
26
|
-
# If
|
27
|
-
if file =~
|
28
|
-
|
29
|
-
|
26
|
+
# If relative path, e.g. ./somefile, ../somefile
|
27
|
+
if file =~ /^\.+\//
|
28
|
+
page = context['page']
|
29
|
+
if local_dir = page['dir']
|
30
|
+
File.expand_path(File.join(local_dir, file))
|
31
|
+
else
|
32
|
+
local_dir = File.dirname page['path']
|
33
|
+
File.expand_path(File.join(root, local_dir, file))
|
34
|
+
end
|
30
35
|
|
31
36
|
# If absolute or relative to a user directory, e.g. /Users/Bob/somefile or ~/somefile
|
32
37
|
elsif file =~ /^[\/~]/
|
data/lib/octopress-ink/plugin.rb
CHANGED
@@ -274,7 +274,11 @@ module Octopress
|
|
274
274
|
end
|
275
275
|
|
276
276
|
def add_docs
|
277
|
-
|
277
|
+
find_assets(@docs_dir).each do |asset|
|
278
|
+
unless asset =~ /^_/
|
279
|
+
@docs << Assets::DocPageAsset.new(self, @docs_dir, asset)
|
280
|
+
end
|
281
|
+
end
|
278
282
|
end
|
279
283
|
|
280
284
|
def add_files
|
@@ -53,7 +53,7 @@ module Octopress
|
|
53
53
|
path = markup.match(SYNTAX)[1]
|
54
54
|
@path = Helpers::Path.expand(path, context)
|
55
55
|
begin
|
56
|
-
|
56
|
+
File.open(@path).read
|
57
57
|
rescue
|
58
58
|
raise IOError.new "Render failed: {% #{@tag_name} #{@og_markup}%}. The file '#{path}' could not be found at #{@path}."
|
59
59
|
end
|