zarchitect 1.0.1 → 1.0.4
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/content.rb +5 -1
- data/lib/zarchitect/post.rb +7 -2
- data/lib/zarchitect.rb +1 -0
- 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: 469554302adb7c026b4d3fce6688def41c093072aae0f1d92c728ab65644d7c1
|
|
4
|
+
data.tar.gz: afebeacb1f9fa7ed5721d9a915260d4146608e3ab9b4f67f95687544a97ef71a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: aefca6ec59f4bb36de7580e9e1eae6f62f1540c4b298dbdaff6198a69f6314f3ee30ab81c6babf2506da6fc15b016d9733e9c24760c86f5f1136a7851c7cf281
|
|
7
|
+
data.tar.gz: 607cc4bbdf68f8731de85ed3f194b787168cb3afd6ac7e9d8ec421de4521b3d893115f56f72c51e03e3d212fdc506e37a1fe8a92fe058652cab70e235766db16
|
data/lib/zarchitect/content.rb
CHANGED
|
@@ -106,10 +106,14 @@ class Content < Zarchitect
|
|
|
106
106
|
end
|
|
107
107
|
|
|
108
108
|
ar.delete_if { |x| x.nil? }
|
|
109
|
+
str = ar.join("\n")
|
|
109
110
|
|
|
111
|
+
if @post.conf.has_option?("katex")
|
|
112
|
+
str = Katex.render(str)
|
|
113
|
+
end
|
|
110
114
|
markdown = Redcarpet::Markdown.new(RougeHTML,
|
|
111
115
|
autolink: true)
|
|
112
|
-
chtml = markdown.render(
|
|
116
|
+
chtml = markdown.render(str)
|
|
113
117
|
|
|
114
118
|
parse(chtml)
|
|
115
119
|
|
data/lib/zarchitect/post.rb
CHANGED
|
@@ -146,11 +146,16 @@ 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 = Sanitize.fragment(@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
|
data/lib/zarchitect.rb
CHANGED
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.4
|
|
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
|