dimples 1.4.2 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/dimples/configuration.rb +2 -2
- data/lib/dimples/post.rb +2 -11
- data/lib/dimples/site.rb +3 -2
- data/lib/dimples/version.rb +1 -1
- 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: 9ae8bc727e02d6f02d3e14da64cee9c8660f9aff
|
|
4
|
+
data.tar.gz: 5a9e818fd763eaa3260975c769b0f7aac1927b5a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 02c0a846329aaf6efa707bd94e93f0d81a897b025a989f9c47de958b0125ec174e338a5b422ed4414a9f3031f1ecd84c1158f5a6e9be684b3b5442ae2f42c80b
|
|
7
|
+
data.tar.gz: a8d6fe8b156c157aa31489a12b7da8c357bb341d392db3f6f4fbf69d3b19fceb421ce61d13c1a70907eb714d63f023e97d81c05c8fc385406870c83ece4461b6
|
|
@@ -28,8 +28,8 @@ module Dimples
|
|
|
28
28
|
'destination_path' => File.join(current_path, 'site'),
|
|
29
29
|
|
|
30
30
|
'paths' => {
|
|
31
|
-
'
|
|
32
|
-
'
|
|
31
|
+
'archives' => 'archives',
|
|
32
|
+
'posts' => 'archives/%Y/%m/%d',
|
|
33
33
|
'categories' => 'archives/categories'
|
|
34
34
|
},
|
|
35
35
|
|
data/lib/dimples/post.rb
CHANGED
|
@@ -52,17 +52,8 @@ module Dimples
|
|
|
52
52
|
end
|
|
53
53
|
|
|
54
54
|
def output_file_path(parent_path)
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
if @site.config['paths']['post']
|
|
58
|
-
path = @date.strftime(@site.config['paths']['post'])
|
|
59
|
-
parts.concat(path.split('/')) if path
|
|
60
|
-
end
|
|
61
|
-
|
|
62
|
-
parts << @slug
|
|
63
|
-
parts << "#{@filename}.#{@extension}"
|
|
64
|
-
|
|
65
|
-
File.join(parts)
|
|
55
|
+
parent_path = @date.strftime(parent_path) if parent_path =~ /%/
|
|
56
|
+
File.join([parent_path, @slug, "#{@filename}.#{@extension}"])
|
|
66
57
|
end
|
|
67
58
|
end
|
|
68
59
|
end
|
data/lib/dimples/site.rb
CHANGED
|
@@ -37,6 +37,7 @@ module Dimples
|
|
|
37
37
|
@source_paths[path.to_sym] = File.join(@source_paths[:root], path)
|
|
38
38
|
end
|
|
39
39
|
|
|
40
|
+
@output_paths[:archives] = File.join(@output_paths[:site], @config['paths']['archives'])
|
|
40
41
|
@output_paths[:posts] = File.join(@output_paths[:site], @config['paths']['posts'])
|
|
41
42
|
@output_paths[:categories] = File.join(@output_paths[:site], @config['paths']['categories'])
|
|
42
43
|
end
|
|
@@ -129,7 +130,7 @@ module Dimples
|
|
|
129
130
|
end
|
|
130
131
|
|
|
131
132
|
if @config['generation']['paginated_posts']
|
|
132
|
-
paginate(posts: @posts, paths: [@output_paths[:
|
|
133
|
+
paginate(posts: @posts, paths: [@output_paths[:archives]], layout: @config['layouts']['posts'])
|
|
133
134
|
end
|
|
134
135
|
end
|
|
135
136
|
|
|
@@ -154,7 +155,7 @@ module Dimples
|
|
|
154
155
|
template = @config['layouts'][date_type] || @config['layouts']['archives'] || @config['layouts']['posts']
|
|
155
156
|
archives[date_type.to_sym].each_pair do |date_title, posts|
|
|
156
157
|
|
|
157
|
-
paths = [@output_paths[:
|
|
158
|
+
paths = [@output_paths[:archives], posts[0].year]
|
|
158
159
|
paths << posts[0].month if date_type =~ /month|day/
|
|
159
160
|
paths << posts[0].day if date_type == 'day'
|
|
160
161
|
|
data/lib/dimples/version.rb
CHANGED