zarchitect 1.7.4 → 1.7.6

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
  SHA256:
3
- metadata.gz: d83437139018b26d57e8e7a1262b2e320224e2c7b148221de25411ce5da240d5
4
- data.tar.gz: 1622714f8eb136d19c2b94824db8ba0e60b2b49ba6a0fe99be15fbc0e167ecb0
3
+ metadata.gz: c6ed4df3a45c77366a29f099fc6b8404336f19425e0d1af1bdde2243d293cd8a
4
+ data.tar.gz: 9e58c56d87f39048a53fc83c1592b907916d4ee28dca85eaa46372f49089bd6e
5
5
  SHA512:
6
- metadata.gz: c3d05b7288aa939f2e493e6877e7994192acc41db00ece60dd775dacbc34b793c92da013de12c13e7509d19eb30b29ae77751a396fdb53addfaae674641cdd21
7
- data.tar.gz: e39a6f06e8d52154f3691b2dad2db02462a10e21a4061709070be2e52cf5d384ac2e4475210a0016066839efa0a08cdaee87f2f4c7b4d21b6a51f5a302758662
6
+ metadata.gz: c33acb41a7d61b40f8f7411ec869b507ed307470cd280f512906caab7d33007fcdde96676a23682476175c79afeb1c9da894ed4b6567994d9f5d71ceccb4d7e2
7
+ data.tar.gz: 3fefba9cd5671faf90d440867f5d0bb0600798fbe29e6854864f01f68b1ab03962d6eebc021547e21d47c853f4b410ae0550528b6b9f2c444555171dd99cb84c
@@ -200,7 +200,8 @@ class Content < Zarchitect
200
200
  end
201
201
  end
202
202
  else
203
- GPI.print html if GPI::CLU.check_option('v')
203
+ # nokogiri debug
204
+ # GPI.print html if GPI::CLU.check_option('v')
204
205
  node = Nokogiri::HTML5.fragment(html) do |config|
205
206
  config.strict.noblanks
206
207
  end
@@ -22,15 +22,28 @@ class ZRSS < Zarchitect
22
22
  rss = RSS::Maker.make("atom") do |maker|
23
23
  maker.channel.title = Zarchitect.conf.site_name
24
24
  maker.channel.author = Zarchitect.conf.admin
25
- maker.channel.updated = Time.now.to_s
26
- maker.channel.about = Zarchitect.conf.site_description
27
- maker.channel.link = Zarchitect.conf.url
25
+ #maker.channel.updated = Time.now.to_s
26
+ maker.channel.updated = @items[0].dates
27
+ #maker.channel.about = Zarchitect.conf.site_description
28
+ maker.channel.about = Zarchitect.conf.url
29
+ link = maker.channel.links.new_link
30
+ link.href = Zarchitect.conf.url
31
+ link.rel = 'alternate'
32
+ link = maker.channel.links.new_link
33
+ link.href = Zarchitect.conf.feed_url
34
+ link.rel = 'self'
35
+ #maker.channel.link = Zarchitect.conf.url
36
+ #maker.channel.link = Zarchitect.conf.feed_url
28
37
 
29
38
  @items.each do |item|
30
39
  maker.items.new_item do |rss_item|
31
40
  rss_item.title = item.title
32
41
  rss_item.pubDate = item.dates
33
42
  rss_item.description = item.description
43
+ link = rss_item.links.new_link
44
+ link.href = item.link
45
+ link.rel = 'alternate'
46
+ link.type = 'text/html'
34
47
  rss_item.link = item.link
35
48
  #rss_item.guid = item.guid
36
49
  end
data/lib/zarchitect.rb CHANGED
@@ -6,10 +6,11 @@ require 'rss'
6
6
  require 'nokogiri'
7
7
  require 'katex'
8
8
  require 'sitemap_generator'
9
+ require 'pathname'
9
10
 
10
11
  class Zarchitect
11
12
 
12
- VERSION = "1.7.4"
13
+ VERSION = "1.7.6"
13
14
  HTMLDIR = "_html"
14
15
  BUILDIR = "_build"
15
16
  NODEDIR = "_build/nodes"
@@ -97,7 +98,9 @@ class Zarchitect
97
98
  Dir[ File.join(NODEDIR, "**", "*") ].reverse.reject do |fullpath|
98
99
  if File.directory?(fullpath)
99
100
  GPI.print "deleting dir #{fullpath}"
100
- Dir.delete(fullpath)
101
+ pathname = Pathname.new(fullpath).expand_path
102
+ pathname.rmtree
103
+ #Dir.delete(fullpath)
101
104
  GPI.print "deleted dir #{fullpath}"
102
105
  else
103
106
  GPI.print "deleting file #{fullpath}"
@@ -109,7 +112,9 @@ class Zarchitect
109
112
  Dir[ File.join(HTMLDIR, "**", "*") ].reverse.reject do |fullpath|
110
113
  if File.directory?(fullpath)
111
114
  GPI.print "deleting dir #{fullpath}"
112
- Dir.delete(fullpath)
115
+ pathname = Pathname.new(fullpath).expand_path
116
+ pathname.rmtree
117
+ #Dir.delete(fullpath)
113
118
  GPI.print "deleted dir #{fullpath}"
114
119
  else
115
120
  GPI.print "deleting file #{fullpath}"
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.7.4
4
+ version: 1.7.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - ryu
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-05 00:00:00.000000000 Z
11
+ date: 2023-07-08 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Yet another static website generator
14
14
  email: ryu@tohya.net