jekyll-activity-pub 0.2.8 → 0.2.10
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/jekyll/activity_pub/activity.rb +7 -2
- data/lib/jekyll-activity-pub-fep-1042.rb +6 -4
- 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: b7c8c48c9feaf8a6694f65b9ed392a1934ccb492105b701681ee1048c73dbfce
|
4
|
+
data.tar.gz: 7a3520277e1c376e3bf03c0f8c1bb7639185b1a0d61e8ec0759aba9f775b8628
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8a2b458cf7785d417a7140086dd946242c945ab19fd484d01b843c4c01e860e64562246f46255842838728021b899b138db1a2bcb0d7d4897ae11ce03fcaee5
|
7
|
+
data.tar.gz: 0cd9c974e382de6afc6e38d507a199ce41d5f7d356ea61a3304339cf9732cac7c771a9924332c6d8ccdacc5d2f803a7d4085d1809ebfc78c6716b77454afef35
|
@@ -11,6 +11,9 @@ module Jekyll
|
|
11
11
|
class Activity < Jekyll::Page
|
12
12
|
include Helper
|
13
13
|
|
14
|
+
# HTML white space removal
|
15
|
+
WHITE_SPACE = />\s+</.freeze
|
16
|
+
|
14
17
|
# @param :doc [Jekyll::Document]
|
15
18
|
attr_reader :doc
|
16
19
|
|
@@ -37,6 +40,8 @@ module Jekyll
|
|
37
40
|
|
38
41
|
# @return [nil]
|
39
42
|
def read_yaml(*)
|
43
|
+
doc_content = doc.content.tr("\n", '').gsub(WHITE_SPACE, '><')
|
44
|
+
|
40
45
|
self.data = {
|
41
46
|
'@context' => [
|
42
47
|
'https://www.w3.org/ns/activitystreams',
|
@@ -58,10 +63,10 @@ module Jekyll
|
|
58
63
|
'cc' => [Notifier.followers_url],
|
59
64
|
'inReplyTo' => doc.data['in_reply_to'],
|
60
65
|
'sensitive' => sensitive?,
|
61
|
-
'content' =>
|
66
|
+
'content' => doc_content,
|
62
67
|
'name' => doc.data['title'],
|
63
68
|
'contentMap' => {
|
64
|
-
locale =>
|
69
|
+
locale => doc_content
|
65
70
|
},
|
66
71
|
'attachment' => attachments,
|
67
72
|
'tag' => [],
|
@@ -11,7 +11,7 @@
|
|
11
11
|
# activity generation but before write.
|
12
12
|
require_relative 'jekyll-activity-pub-fep-fffd'
|
13
13
|
|
14
|
-
Jekyll::Hooks.register %i[actor activity], :
|
14
|
+
Jekyll::Hooks.register %i[actor activity outbox following create update delete], :pre_render, priority: 8 do |page|
|
15
15
|
Jekyll.logger.info 'FEP 1042:', 'Generating'
|
16
16
|
|
17
17
|
site = page.site
|
@@ -72,8 +72,10 @@ Jekyll::Hooks.register %i[actor activity], :post_init, priority: 8 do |page|
|
|
72
72
|
uri = Addressable::URI.parse(page.data['id'])
|
73
73
|
add_protocol_to_uri(uri, protocol)
|
74
74
|
|
75
|
-
|
76
|
-
|
75
|
+
if url
|
76
|
+
formats.each do |format|
|
77
|
+
url << Jekyll::ActivityPub::Link.new(site, uri.to_s, 'alternate', format)
|
78
|
+
end
|
77
79
|
end
|
78
80
|
end
|
79
81
|
|
@@ -84,7 +86,7 @@ Jekyll::Hooks.register %i[actor activity], :post_init, priority: 8 do |page|
|
|
84
86
|
Jekyll.logger.debug 'FEP 1042:', "Generating #{uri.path} (#{protocol})"
|
85
87
|
|
86
88
|
json = convert_uris(data, site.config['url'], protocol)
|
87
|
-
json['url'] = url
|
89
|
+
json['url'] = url if url
|
88
90
|
json['id'] = uri.to_s
|
89
91
|
|
90
92
|
# XXX: Only works on forward slash OSes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-activity-pub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sutty
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-05-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: distributed-press-api-client
|