zarchitect 1.0.1 → 1.0.2
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/zarchitect/post.rb +8 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 30e062bb13035f3e8d254ca6b5870da49c05632db2216808053ad279fe502799
|
|
4
|
+
data.tar.gz: b1048c3eff90b5137c85a2fb369d5303613733b81a61dfae7dbe534a77613353
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b88bdc7df4e7a605d57fa07c7074889706a47c76f541a38eade30e271417933a73e48998bc93524b11d4bc167c35b755d46a063325a0133a00acf0d7e1e1df34
|
|
7
|
+
data.tar.gz: 41342f6caf0325d422e6c698d2f576571b933c9bcd5e6d5711add11fe4c5422fb560f84b13e1c2e02a3b03c9d84e6f05e6218f6fdb612974d9756761143dcfaa
|
data/lib/zarchitect/post.rb
CHANGED
|
@@ -146,15 +146,21 @@ class Post < Zarchitect
|
|
|
146
146
|
|
|
147
147
|
def set_description
|
|
148
148
|
if @conf.has_option?('description')
|
|
149
|
-
@description = @conf.description
|
|
149
|
+
@description = @conf.description << "..."
|
|
150
|
+
elsif @conf.has_option?('preview')
|
|
151
|
+
@description = @conf.preview << "..."
|
|
150
152
|
else
|
|
151
153
|
nodes = @content.nodes.select { |n| n.type == "p" }
|
|
152
154
|
if nodes.count > 0
|
|
153
|
-
@description = Sanitize.fragment(nodes[0])
|
|
155
|
+
@description = Sanitize.fragment(nodes[0].html)
|
|
156
|
+
if @description.length > 120
|
|
157
|
+
@description = @description[0..120]
|
|
158
|
+
end
|
|
154
159
|
else
|
|
155
160
|
@description = ""
|
|
156
161
|
end
|
|
157
162
|
end
|
|
163
|
+
@description << "..."
|
|
158
164
|
end
|
|
159
165
|
|
|
160
166
|
def setup_html
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zarchitect
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ryu
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-12-
|
|
11
|
+
date: 2021-12-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: Yet another static website generator
|
|
14
14
|
email: ryu@tohya.net
|