octopress-docs 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/octopress-docs/version.rb +1 -1
- data/lib/octopress-docs.rb +13 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0878e319fb7db83f2aac9b31a74237537f938079
|
4
|
+
data.tar.gz: 681bec4bb92b553a2f37fb790a29fb8d01e8e150
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76ff3ea327d241f8608f97c2396f3d23cf7b60a2db9945bed6b27cf34fb38e1c509cc92ba440ca58716eafa5a5656e0c21b3d3edcb986662f133e0b589356178
|
7
|
+
data.tar.gz: 25c729ff14d795020c18f6c3459500818bc146e502df8dfedaa50b0cacd0e5db4367a293ce74903df0e1d6c6154dae97de61647485f808161ce7fba97a5c9d72
|
data/lib/octopress-docs.rb
CHANGED
@@ -57,14 +57,8 @@ module Octopress
|
|
57
57
|
end
|
58
58
|
|
59
59
|
def self.add_plugin_docs(plugin)
|
60
|
-
plugin_doc_pages = []
|
61
60
|
options = plugin_options(plugin)
|
62
|
-
|
63
|
-
unless doc =~ /^_/
|
64
|
-
opts = options.merge({file: doc, dir: options[:docs_path]})
|
65
|
-
plugin_doc_pages << add_doc_page(opts)
|
66
|
-
end
|
67
|
-
end
|
61
|
+
plugin_doc_pages = add_asset_docs(options)
|
68
62
|
|
69
63
|
# If there is no docs index page, set the reame as the index page
|
70
64
|
has_index = !plugin_doc_pages.select {|d| d.file =~ /^index/ }.empty?
|
@@ -112,6 +106,7 @@ module Octopress
|
|
112
106
|
options[:docs_path] ||= File.join(options[:dir], 'assets', 'docs')
|
113
107
|
docs = []
|
114
108
|
docs.concat add_root_docs(options)
|
109
|
+
docs.concat add_asset_docs(options)
|
115
110
|
docs.compact!
|
116
111
|
end
|
117
112
|
|
@@ -148,6 +143,17 @@ module Octopress
|
|
148
143
|
|
149
144
|
private
|
150
145
|
|
146
|
+
def self.add_asset_docs(options)
|
147
|
+
docs = []
|
148
|
+
find_doc_pages(options).each do |doc|
|
149
|
+
unless doc =~ /^_/
|
150
|
+
opts = options.merge({file: doc, dir: options[:docs_path]})
|
151
|
+
docs << add_doc_page(opts)
|
152
|
+
end
|
153
|
+
end
|
154
|
+
docs
|
155
|
+
end
|
156
|
+
|
151
157
|
def self.find_doc_pages(options)
|
152
158
|
full_dir = options[:docs_path]
|
153
159
|
glob_assets(full_dir).map do |file|
|