dimples 6.5.3 → 6.5.4

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
  SHA256:
3
- metadata.gz: 29f825d2b0c07f416c9d14934cd4de922a57d7f8ffc63a6212b4a7a37f3a17be
4
- data.tar.gz: 9b90c34993bd637ab9c74e446b4c755bba9ab74ca93d7213a6c7f41c49a02964
3
+ metadata.gz: 6cf8d117beb7579bcf84caf2d216a4856385a43a0648f30a7d9979d7db4afca5
4
+ data.tar.gz: cb7a7c2a0b2ee526856eb003ac37249a977bbb9327696ebf77519d114bfeb35f
5
5
  SHA512:
6
- metadata.gz: 1d11b6b61a326e236cbcf61f70601c16bdff017b7c8751696c7e5c7dfc986be513bab79af18e29e9b8628ccc77f49e946778980d97f56a83eefd98398b8db03a
7
- data.tar.gz: e54743e65c9b6523bfd62d60d832222525486aba0daa92704ed0601bee1c09fa2a72a143aec44e8f7a7e6a1089eb016825ba486d8d9132dbb9696e2ea0977701
6
+ metadata.gz: 6904725909c2571a630afb600f33acfc75156fd4e31846db68762492e9792f8b9f09bbf1b223f6fbda2b63f5a4401966cbca97d8b522d7e2a273ee1182bea6a6
7
+ data.tar.gz: 102c82fd4bf43195015ca6944095a4d7a63e1f2d5cddc6d3ad2e8038b5797492fc3a64ad167ed125570ecef57cf7b944476e0109daf4407e559fbed32721e9a4
@@ -18,6 +18,11 @@ module Dimples
18
18
  @metadata[:draft] ||= false
19
19
  end
20
20
 
21
+ def url
22
+ path = date.strftime(draft ? @site.config.paths.drafts : @site.config.paths.posts)
23
+ "/#{path}/#{slug}/"
24
+ end
25
+
21
26
  def year
22
27
  @year ||= @metadata[:date].strftime('%Y')
23
28
  end
@@ -133,12 +133,7 @@ module Dimples
133
133
 
134
134
  def publish_posts
135
135
  @posts.each do |post|
136
- path = File.join(
137
- @paths[:destination],
138
- post.date.strftime(post.draft ? @config.paths.drafts : @config.paths.posts),
139
- post.slug
140
- )
141
-
136
+ path = File.join(@paths[:destination], post.url.split('/'))
142
137
  post.write(path)
143
138
  end
144
139
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dimples
4
- VERSION = '6.5.3'
4
+ VERSION = '6.5.4'
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: 6.5.3
4
+ version: 6.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Bogan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-28 00:00:00.000000000 Z
11
+ date: 2020-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hashie