dimples 5.4.0 → 5.5.0

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: 200738213683566f18c8503e31d44d48f132b043
4
- data.tar.gz: 66409d106ac6a6247c2549ea908fd0d8f3dfb2eb
3
+ metadata.gz: 347bd6a8efb9b677218b6f8ed69e3888fbf3ac2b
4
+ data.tar.gz: 1b7886a6af98d37c50d3538b3f180c04a7b05a91
5
5
  SHA512:
6
- metadata.gz: 123ed872929e04612c818c3c8b83126e78d2e983991a6d6f4ac0ab7d216055162e7ffde45e083b3a5c386eca7a752d85bdb5e7c211afa51cf73e65d7531a8ea3
7
- data.tar.gz: 89bdbea6927a637f35a3688b0dd4dfed421093e0a0be7bb0ff4e5377eb9d588f1a1c7870937032cad36f525fed88b302a39d3dea8e1fe25e86ad3bd04063a97f
6
+ metadata.gz: e880ddc6967301841abf9ff274e7082f9b7320f020bb0c87e48f4aad3795eaff97ecda8b33e96647486fac8696aa6ea6bb2531341c3525a37043959fbc2e4565
7
+ data.tar.gz: b744697a3b9566a3f2e029be3bb239182640df0e21834a6b5d5cc5d96a4026ebc4a5724ef2a29c499c9a149d3ed0941218e4c132d0955e365abac5f0ac811b10
@@ -20,6 +20,7 @@ module Dimples
20
20
  {
21
21
  output: './public',
22
22
  archives: 'archives',
23
+ paginated_posts: 'posts',
23
24
  posts: 'archives/%Y/%m/%d',
24
25
  categories: 'archives/categories'
25
26
  }
@@ -27,6 +28,7 @@ module Dimples
27
28
 
28
29
  def self.default_generation
29
30
  {
31
+ paginated_posts: true,
30
32
  archives: true,
31
33
  year_archives: true,
32
34
  month_archives: true,
@@ -41,6 +43,7 @@ module Dimples
41
43
  {
42
44
  post: 'post',
43
45
  category: 'category',
46
+ paginated_post: 'paginated_post',
44
47
  archive: 'archive',
45
48
  date_archive: 'archive'
46
49
  }
data/lib/dimples/site.rb CHANGED
@@ -159,6 +159,14 @@ module Dimples
159
159
  end
160
160
 
161
161
  publish_feeds(@posts, @paths[:output]) if @config.generation.main_feed
162
+
163
+ if @config.generation.paginated_posts
164
+ paginate_posts(
165
+ @posts,
166
+ File.join(@paths[:output], @config.paths.paginated_posts),
167
+ @config.layouts.paginated_post
168
+ )
169
+ end
162
170
  end
163
171
 
164
172
  def publish_pages
@@ -181,14 +189,6 @@ module Dimples
181
189
  end
182
190
 
183
191
  def publish_archives
184
- if @config.generation.archives
185
- paginate_posts(
186
- @posts,
187
- File.join(@paths[:output], @config.paths.archives),
188
- @config.layouts.archive
189
- )
190
- end
191
-
192
192
  %w[year month day].each do |date_type|
193
193
  next unless @config.generation["#{date_type}_archives"]
194
194
  publish_date_archive(date_type.to_sym)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dimples
4
- VERSION = '5.4.0'
4
+ VERSION = '5.5.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dimples
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.4.0
4
+ version: 5.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Bogan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-07 00:00:00.000000000 Z
11
+ date: 2018-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hashie