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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9c053a92ddd197a30525d00f21dfd46dea48d8f4
4
- data.tar.gz: f862f7af50f5915afac0123bb245a1ecb38aca57
3
+ metadata.gz: 9ae8bc727e02d6f02d3e14da64cee9c8660f9aff
4
+ data.tar.gz: 5a9e818fd763eaa3260975c769b0f7aac1927b5a
5
5
  SHA512:
6
- metadata.gz: 7fd6b61f03ae93808d2cc06618c766a4994bbb9716f6be348061fe9d36974493ddc8504bc1a7e444b369d2cbd695b3ae0e379f57dc2d6a29bb36bcb78f0b6cd5
7
- data.tar.gz: 6aca9885f896bdd371e5a257d220060896a25c2f18b3d135c4d503ae35785c2e74588a9620f687ccbd456322dfd8bf4964efdd8e3aedb1255151f6c8e06a2f71
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
- 'posts' => 'archives',
32
- 'post' => '%Y/%m/%d',
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
- parts = [parent_path]
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[:posts]], layout: @config['layouts']['posts'])
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[:posts], posts[0].year]
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
 
@@ -1,3 +1,3 @@
1
1
  module Dimples
2
- VERSION = "1.4.2"
2
+ VERSION = "1.5.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dimples
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.2
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Bogan