jekyll-webmention_io 4.0.0 → 4.1.0
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/assets/JekyllWebmentionIO.js +2 -2
- data/lib/jekyll/assets/_utils.js +2 -2
- data/lib/jekyll/generators/queue_webmentions.rb +15 -2
- data/lib/jekyll/tags/count.rb +1 -1
- data/lib/jekyll/tags/webmention.rb +15 -6
- data/lib/jekyll/tags/webmention_type.rb +2 -2
- data/lib/jekyll/templates/bookmarks.html +54 -15
- data/lib/jekyll/templates/likes.html +38 -9
- data/lib/jekyll/templates/links.html +54 -15
- data/lib/jekyll/templates/posts.html +55 -8
- data/lib/jekyll/templates/replies.html +52 -18
- data/lib/jekyll/templates/reposts.html +37 -8
- data/lib/jekyll/templates/rsvps.html +37 -10
- data/lib/jekyll/templates/webmentions.html +36 -17
- data/lib/jekyll/webmention_io/version.rb +1 -1
- data/lib/jekyll/webmention_io.rb +8 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc9d31a7e443e2a0b12a6d4b5ce65fff675e8302113f751eff6b5bbde3d090e3
|
4
|
+
data.tar.gz: 3c57fc8d14d3345def7d2bd432745fbcd9551d9931adc7ea870d7ae7ed638f6f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a650de9ca6309c29e09f5f9533ac5ca62dddec88f8dca8302efb9aee4254fb7445c86f68f4bc06f070189e6cf47f04efcaa6942e9cdd523536e2bc319b70c531
|
7
|
+
data.tar.gz: afd4a141acc8cb97e78e27f0bfcac62f4d8d3d355a4362b7ef94789ba3e5710023f3813bb04a7a9d6de27af0e84167524440d88181aaceb3d18469362deae115
|
@@ -189,7 +189,7 @@
|
|
189
189
|
incoming[plural_type].push( webmention );
|
190
190
|
}
|
191
191
|
|
192
|
-
// If there
|
192
|
+
// If there's a generic, add it there too
|
193
193
|
if ( incoming.webmentions )
|
194
194
|
{
|
195
195
|
incoming.webmentions.push( webmention );
|
@@ -528,4 +528,4 @@
|
|
528
528
|
collectExistingWebmentions();
|
529
529
|
identifyWebmentionCollections();
|
530
530
|
|
531
|
-
}(this, this.document));
|
531
|
+
}(this, this.document));
|
data/lib/jekyll/assets/_utils.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
// @ts-check
|
2
2
|
/**
|
3
3
|
* WebMentions.io JS
|
4
|
-
* A re-tooling of Aaron Parecki
|
4
|
+
* A re-tooling of Aaron Parecki's recommended JS for using the WebMention.io API
|
5
5
|
*
|
6
6
|
* Updates Webmentions on a static site immediately when the page is loaded and
|
7
7
|
* in real-time (using WebSockets) as the user engages with the page.
|
@@ -31,4 +31,4 @@
|
|
31
31
|
return k;
|
32
32
|
};
|
33
33
|
|
34
|
-
}(this,this.document));
|
34
|
+
}(this,this.document));
|
@@ -178,6 +178,7 @@ module Jekyll
|
|
178
178
|
collection = get_collection_for_post(post)
|
179
179
|
|
180
180
|
uris = {}
|
181
|
+
parser = URI::Parser.new
|
181
182
|
|
182
183
|
syndication_targets = []
|
183
184
|
syndication_targets += post.data["syndicate_to"] || []
|
@@ -203,8 +204,20 @@ module Jekyll
|
|
203
204
|
end
|
204
205
|
|
205
206
|
post.content.scan(/(?:https?:)?\/\/[^\s)#\[\]{}<>%|\^"']+/) do |match|
|
206
|
-
|
207
|
-
|
207
|
+
begin
|
208
|
+
# We do this as a poor man's way to validate the URI. We do most
|
209
|
+
# of the work with the regex scan above, then attempt a parse as
|
210
|
+
# the last test in case a bad URI fell through the cracks.
|
211
|
+
#
|
212
|
+
# Of course, better would be to fix the regex, but consider this
|
213
|
+
# belt-and-suspenders...
|
214
|
+
parser.parse(parser.escape(match))
|
215
|
+
|
216
|
+
unless uris.key? match
|
217
|
+
uris[match] = false
|
218
|
+
end
|
219
|
+
rescue => e
|
220
|
+
WebmentionIO.log "msg", "Encountered unexpected malformed URI '#{match}' in #{post.path}, skipping..."
|
208
221
|
end
|
209
222
|
end
|
210
223
|
|
data/lib/jekyll/tags/count.rb
CHANGED
@@ -39,8 +39,8 @@ module Jekyll
|
|
39
39
|
WebmentionIO.log "info", "#{template.capitalize} template:\n\n#{@template}\n\n"
|
40
40
|
end
|
41
41
|
|
42
|
-
def set_data(data, types)
|
43
|
-
@data = { "webmentions" => data, "types" => types }
|
42
|
+
def set_data(data, types, html_proofer_ignore)
|
43
|
+
@data = { "webmentions" => data, "types" => types, "html_proofer_ignore" => html_proofer_ignore }
|
44
44
|
end
|
45
45
|
|
46
46
|
def extract_type(type, webmentions)
|
@@ -62,14 +62,23 @@ module Jekyll
|
|
62
62
|
end
|
63
63
|
|
64
64
|
def render(context)
|
65
|
+
# Initialize an empty set of webmentions (we'll populate later if
|
66
|
+
# there actually are any).
|
67
|
+
webmentions = []
|
68
|
+
|
69
|
+
# Capture the types in case JS needs them
|
70
|
+
types = []
|
71
|
+
|
72
|
+
# Retrieve the html_proofer_ignore config setting so we can pass
|
73
|
+
# it into the templates.
|
74
|
+
site = context.registers[:site]
|
75
|
+
html_proofer_ignore = site.config.dig("webmentions", "html_proofer_ignore") || "none"
|
76
|
+
|
65
77
|
# Get the URI
|
66
78
|
args = @text.split(/\s+/).map(&:strip)
|
67
79
|
uri = args.shift
|
68
80
|
uri = lookup(context, uri)
|
69
81
|
|
70
|
-
# capture the types in case JS needs them
|
71
|
-
types = []
|
72
|
-
|
73
82
|
if @cached_webmentions.key? uri
|
74
83
|
all_webmentions = @cached_webmentions[uri].clone
|
75
84
|
WebmentionIO.log "info", "#{all_webmentions.length} total webmentions for #{uri}"
|
@@ -93,9 +102,9 @@ module Jekyll
|
|
93
102
|
end
|
94
103
|
|
95
104
|
webmentions = sort_webmentions(webmentions)
|
96
|
-
set_data(webmentions, types)
|
97
105
|
end
|
98
106
|
|
107
|
+
set_data(webmentions, types, html_proofer_ignore)
|
99
108
|
render_into_template(context.registers)
|
100
109
|
end
|
101
110
|
|
@@ -12,9 +12,9 @@ module Jekyll
|
|
12
12
|
# Superclass for Webmention types:
|
13
13
|
# [ bookmarks | likes | links | posts | replies | reposts | rsvps ]
|
14
14
|
class WebmentionTypeTag < WebmentionTag
|
15
|
-
def set_data(data, _types)
|
15
|
+
def set_data(data, _types, html_proofer_ignore)
|
16
16
|
webmentions = extract_type @template_name, data
|
17
|
-
@data = { "webmentions" => webmentions.values }
|
17
|
+
@data = { "webmentions" => webmentions.values, "html_proofer_ignore" => html_proofer_ignore }
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|
@@ -1,26 +1,65 @@
|
|
1
|
-
|
1
|
+
{%- if html_proofer_ignore == "all" -%}
|
2
|
+
{%- assign html_proofer_attr = " data-proofer-ignore" -%}
|
3
|
+
{%- endif -%}
|
4
|
+
<div class="webmentions webmentions--bookmarks"{{ html_proofer_attr }}>
|
2
5
|
{% if webmentions.size > 0 %}
|
3
6
|
<ol class="webmentions__list">
|
4
7
|
{% for webmention in webmentions %}
|
5
|
-
<li id="webmention-{{ webmention.id }}" class="webmentions__item webmention
|
6
|
-
<
|
7
|
-
{
|
8
|
-
|
9
|
-
|
8
|
+
<li id="webmention-{{ webmention.id }}" class="webmention webmentions__item webmention--{{ webmention.type }}">
|
9
|
+
<article class="h-cite
|
10
|
+
{% unless webmention.author %}webmention--no-author{% endunless %}
|
11
|
+
{% unless webmention.author.photo %}webmention--no-photo{% endunless %}
|
12
|
+
">
|
10
13
|
{% if webmention.author %}
|
11
|
-
|
14
|
+
<div class="webmention__author p-author h-card">
|
15
|
+
{% capture author_id %}
|
16
|
+
{% if webmention.author.photo %}
|
17
|
+
<img
|
18
|
+
class="webmention__author__photo u-photo"
|
19
|
+
src="{{ webmention.author.photo }}"
|
20
|
+
alt=""
|
21
|
+
{% if webmention.author.name %}
|
22
|
+
title="{{ webmention.author.name }}"
|
23
|
+
{% endif %}
|
24
|
+
>
|
25
|
+
{% endif %}
|
26
|
+
|
27
|
+
{% if webmention.author.name %}
|
28
|
+
<span class="webmention__author__name p-name">{{ webmention.author.name }}</span>
|
29
|
+
{% endif %}
|
30
|
+
{% endcapture %}
|
31
|
+
|
32
|
+
{% if webmention.author.url %}
|
33
|
+
<a class="u-url" href="{{ webmention.author.url }}" rel="nofollow">{{ author_id }}</a>
|
34
|
+
{% else %}
|
35
|
+
{{ author_id }}
|
36
|
+
{% endif %}
|
37
|
+
</div>
|
12
38
|
{% endif %}
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
39
|
+
|
40
|
+
<div class="webmention__content p-content">
|
41
|
+
{% if webmention.content %}
|
42
|
+
{{ webmention.content }}
|
43
|
+
{% else %}
|
44
|
+
{{ webmention.title }}
|
45
|
+
{% endif %}
|
46
|
+
</div>
|
47
|
+
|
48
|
+
<div class="webmention__meta">
|
49
|
+
{% if webmention.pubdate %}
|
50
|
+
<time class="webmention__pubdate dt-published"
|
51
|
+
datetime="{{ webmention.pubdate | date: '%FT%T%:z' }}">{{ webmention.pubdate | date: '%d %B %Y' }}</time>
|
52
|
+
{% endif %}
|
53
|
+
{% if webmention.pubdate and webmention.uri %}|{% endif %}
|
54
|
+
{% if webmention.uri %}
|
55
|
+
<a class="webmention__source u-url" href="{{ webmention.uri }}" rel="nofollow">Permalink</a>
|
56
|
+
{% endif %}
|
57
|
+
</div>
|
58
|
+
</article>
|
20
59
|
</li>
|
21
60
|
{% endfor %}
|
22
61
|
</ol>
|
23
62
|
{% else %}
|
24
63
|
<p class="webmentions__not-found">No bookmarks were found.</p>
|
25
64
|
{% endif %}
|
26
|
-
</div>
|
65
|
+
</div>
|
@@ -1,17 +1,46 @@
|
|
1
|
-
|
1
|
+
{%- if html_proofer_ignore == "all" -%}
|
2
|
+
{%- assign html_proofer_attr = " data-proofer-ignore" -%}
|
3
|
+
{%- endif -%}
|
4
|
+
<div class="webmentions webmentions--likes"{{ html_proofer_attr }}>
|
2
5
|
{% if webmentions.size > 0 %}
|
3
6
|
<ol class="webmentions__list">
|
4
7
|
{% for webmention in webmentions %}
|
5
|
-
<li id="webmention-{{ webmention.id }}" class="webmentions__item webmention
|
6
|
-
<
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
8
|
+
<li id="webmention-{{ webmention.id }}" class="webmention webmentions__item webmention--{{ webmention.type }}">
|
9
|
+
<article class="h-cite
|
10
|
+
{% unless webmention.author %}webmention--no-author{% endunless %}
|
11
|
+
{% unless webmention.author.photo %}webmention--no-photo{% endunless %}
|
12
|
+
">
|
13
|
+
{% if webmention.author %}
|
14
|
+
<div class="webmention__author p-author h-card">
|
15
|
+
{% capture author_id %}
|
16
|
+
{% if webmention.author.photo %}
|
17
|
+
<img
|
18
|
+
class="webmention__author__photo u-photo"
|
19
|
+
src="{{ webmention.author.photo }}"
|
20
|
+
alt=""
|
21
|
+
{% if webmention.author.name %}
|
22
|
+
title="{{ webmention.author.name }}"
|
23
|
+
{% endif %}
|
24
|
+
>
|
25
|
+
{% endif %}
|
26
|
+
|
27
|
+
{% if webmention.author.name %}
|
28
|
+
<span class="webmention__author__name p-name">{{ webmention.author.name }}</span>
|
29
|
+
{% endif %}
|
30
|
+
{% endcapture %}
|
31
|
+
|
32
|
+
{% if webmention.author.url %}
|
33
|
+
<a class="u-url" href="{{ webmention.author.url }}" rel="nofollow">{{ author_id }}</a>
|
34
|
+
{% else %}
|
35
|
+
{{ author_id }}
|
36
|
+
{% endif %}
|
37
|
+
</div>
|
38
|
+
{% endif %}
|
39
|
+
</article>
|
11
40
|
</li>
|
12
41
|
{% endfor %}
|
13
42
|
</ol>
|
14
43
|
{% else %}
|
15
|
-
<p class="webmentions__not-found">No likes
|
44
|
+
<p class="webmentions__not-found">No likes have been sent yet!</p>
|
16
45
|
{% endif %}
|
17
|
-
</div>
|
46
|
+
</div>
|
@@ -1,26 +1,65 @@
|
|
1
|
-
|
1
|
+
{%- if html_proofer_ignore == "all" -%}
|
2
|
+
{%- assign html_proofer_attr = " data-proofer-ignore" -%}
|
3
|
+
{%- endif -%}
|
4
|
+
<div class="webmentions webmentions--links"{{ html_proofer_attr }}>
|
2
5
|
{% if webmentions.size > 0 %}
|
3
6
|
<ol class="webmentions__list">
|
4
7
|
{% for webmention in webmentions %}
|
5
|
-
<li id="webmention-{{ webmention.id }}" class="webmentions__item webmention
|
6
|
-
<
|
7
|
-
{
|
8
|
-
|
9
|
-
|
8
|
+
<li id="webmention-{{ webmention.id }}" class="webmention webmentions__item webmention--{{ webmention.type }}">
|
9
|
+
<article class="h-cite
|
10
|
+
{% unless webmention.author %}webmention--no-author{% endunless %}
|
11
|
+
{% unless webmention.author.photo %}webmention--no-photo{% endunless %}
|
12
|
+
">
|
10
13
|
{% if webmention.author %}
|
11
|
-
|
14
|
+
<div class="webmention__author p-author h-card">
|
15
|
+
{% capture author_id %}
|
16
|
+
{% if webmention.author.photo %}
|
17
|
+
<img
|
18
|
+
class="webmention__author__photo u-photo"
|
19
|
+
src="{{ webmention.author.photo }}"
|
20
|
+
alt=""
|
21
|
+
{% if webmention.author.name %}
|
22
|
+
title="{{ webmention.author.name }}"
|
23
|
+
{% endif %}
|
24
|
+
>
|
25
|
+
{% endif %}
|
26
|
+
|
27
|
+
{% if webmention.author.name %}
|
28
|
+
<span class="webmention__author__name p-name">{{ webmention.author.name }}</span>
|
29
|
+
{% endif %}
|
30
|
+
{% endcapture %}
|
31
|
+
|
32
|
+
{% if webmention.author.url %}
|
33
|
+
<a class="u-url" href="{{ webmention.author.url }}" rel="nofollow">{{ author_id }}</a>
|
34
|
+
{% else %}
|
35
|
+
{{ author_id }}
|
36
|
+
{% endif %}
|
37
|
+
</div>
|
12
38
|
{% endif %}
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
39
|
+
|
40
|
+
<div class="webmention__content p-content">
|
41
|
+
{% if webmention.content %}
|
42
|
+
{{ webmention.content }}
|
43
|
+
{% else %}
|
44
|
+
{{ webmention.title }}
|
45
|
+
{% endif %}
|
46
|
+
</div>
|
47
|
+
|
48
|
+
<div class="webmention__meta">
|
49
|
+
{% if webmention.pubdate %}
|
50
|
+
<time class="webmention__pubdate dt-published"
|
51
|
+
datetime="{{ webmention.pubdate | date: '%FT%T%:z' }}">{{ webmention.pubdate | date: '%d %B %Y' }}</time>
|
52
|
+
{% endif %}
|
53
|
+
{% if webmention.pubdate and webmention.uri %}|{% endif %}
|
54
|
+
{% if webmention.uri %}
|
55
|
+
<a class="webmention__source u-url" href="{{ webmention.uri }}" rel="nofollow">Permalink</a>
|
56
|
+
{% endif %}
|
57
|
+
</div>
|
58
|
+
</article>
|
20
59
|
</li>
|
21
60
|
{% endfor %}
|
22
61
|
</ol>
|
23
62
|
{% else %}
|
24
63
|
<p class="webmentions__not-found">No links were found.</p>
|
25
64
|
{% endif %}
|
26
|
-
</div>
|
65
|
+
</div>
|
@@ -1,18 +1,65 @@
|
|
1
|
-
|
1
|
+
{%- if html_proofer_ignore == "all" -%}
|
2
|
+
{%- assign html_proofer_attr = " data-proofer-ignore" -%}
|
3
|
+
{%- endif -%}
|
4
|
+
<div class="webmentions webmentions--posts"{{ html_proofer_attr }}>
|
2
5
|
{% if webmentions.size > 0 %}
|
3
6
|
<ol class="webmentions__list">
|
4
7
|
{% for webmention in webmentions %}
|
5
|
-
<li id="webmention-{{ webmention.id }}" class="webmentions__item webmention
|
6
|
-
<
|
7
|
-
|
8
|
-
{%
|
9
|
-
|
8
|
+
<li id="webmention-{{ webmention.id }}" class="webmention webmentions__item webmention--{{ webmention.type }}">
|
9
|
+
<article class="h-cite
|
10
|
+
{% unless webmention.author %}webmention--no-author{% endunless %}
|
11
|
+
{% unless webmention.author.photo %}webmention--no-photo{% endunless %}
|
12
|
+
">
|
13
|
+
{% if webmention.author %}
|
14
|
+
<div class="webmention__author p-author h-card">
|
15
|
+
{% capture author_id %}
|
16
|
+
{% if webmention.author.photo %}
|
17
|
+
<img
|
18
|
+
class="webmention__author__photo u-photo"
|
19
|
+
src="{{ webmention.author.photo }}"
|
20
|
+
alt=""
|
21
|
+
{% if webmention.author.name %}
|
22
|
+
title="{{ webmention.author.name }}"
|
23
|
+
{% endif %}
|
24
|
+
>
|
25
|
+
{% endif %}
|
26
|
+
|
27
|
+
{% if webmention.author.name %}
|
28
|
+
<span class="webmention__author__name p-name">{{ webmention.author.name }}</span>
|
29
|
+
{% endif %}
|
30
|
+
{% endcapture %}
|
31
|
+
|
32
|
+
{% if webmention.author.url %}
|
33
|
+
<a class="u-url" href="{{ webmention.author.url }}" rel="nofollow">{{ author_id }}</a>
|
34
|
+
{% else %}
|
35
|
+
{{ author_id }}
|
36
|
+
{% endif %}
|
37
|
+
</div>
|
10
38
|
{% endif %}
|
11
|
-
|
39
|
+
|
40
|
+
<div class="webmention__content p-content">
|
41
|
+
{% if webmention.content %}
|
42
|
+
{{ webmention.content }}
|
43
|
+
{% else %}
|
44
|
+
{{ webmention.title }}
|
45
|
+
{% endif %}
|
46
|
+
</div>
|
47
|
+
|
48
|
+
<div class="webmention__meta">
|
49
|
+
{% if webmention.pubdate %}
|
50
|
+
<time class="webmention__pubdate dt-published"
|
51
|
+
datetime="{{ webmention.pubdate | date: '%FT%T%:z' }}">{{ webmention.pubdate | date: '%d %B %Y' }}</time>
|
52
|
+
{% endif %}
|
53
|
+
{% if webmention.pubdate and webmention.uri %}|{% endif %}
|
54
|
+
{% if webmention.uri %}
|
55
|
+
<a class="webmention__source u-url" href="{{ webmention.uri }}" rel="nofollow">Permalink</a>
|
56
|
+
{% endif %}
|
57
|
+
</div>
|
58
|
+
</article>
|
12
59
|
</li>
|
13
60
|
{% endfor %}
|
14
61
|
</ol>
|
15
62
|
{% else %}
|
16
63
|
<p class="webmentions__not-found">No posts were found.</p>
|
17
64
|
{% endif %}
|
18
|
-
</div>
|
65
|
+
</div>
|
@@ -1,31 +1,65 @@
|
|
1
|
-
|
1
|
+
{%- if html_proofer_ignore == "all" -%}
|
2
|
+
{%- assign html_proofer_attr = " data-proofer-ignore" -%}
|
3
|
+
{%- endif -%}
|
4
|
+
<div class="webmentions webmentions--replies"{{ html_proofer_attr }}>
|
2
5
|
{% if webmentions.size > 0 %}
|
3
6
|
<ol class="webmentions__list">
|
4
7
|
{% for webmention in webmentions %}
|
5
|
-
<li id="webmention-{{ webmention.id }}" class="webmentions__item webmention
|
6
|
-
<
|
7
|
-
{
|
8
|
-
|
9
|
-
|
8
|
+
<li id="webmention-{{ webmention.id }}" class="webmention webmentions__item webmention--{{ webmention.type }}">
|
9
|
+
<article class="h-cite
|
10
|
+
{% unless webmention.author %}webmention--no-author{% endunless %}
|
11
|
+
{% unless webmention.author.photo %}webmention--no-photo{% endunless %}
|
12
|
+
">
|
10
13
|
{% if webmention.author %}
|
11
|
-
|
14
|
+
<div class="webmention__author p-author h-card">
|
15
|
+
{% capture author_id %}
|
12
16
|
{% if webmention.author.photo %}
|
13
|
-
<img
|
17
|
+
<img
|
18
|
+
class="webmention__author__photo u-photo"
|
19
|
+
src="{{ webmention.author.photo }}"
|
20
|
+
alt=""
|
21
|
+
{% if webmention.author.name %}
|
22
|
+
title="{{ webmention.author.name }}"
|
23
|
+
{% endif %}
|
24
|
+
>
|
14
25
|
{% endif %}
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
26
|
+
|
27
|
+
{% if webmention.author.name %}
|
28
|
+
<span class="webmention__author__name p-name">{{ webmention.author.name }}</span>
|
29
|
+
{% endif %}
|
30
|
+
{% endcapture %}
|
31
|
+
|
32
|
+
{% if webmention.author.url %}
|
33
|
+
<a class="u-url" href="{{ webmention.author.url }}" rel="nofollow">{{ author_id }}</a>
|
34
|
+
{% else %}
|
35
|
+
{{ author_id }}
|
36
|
+
{% endif %}
|
37
|
+
</div>
|
23
38
|
{% endif %}
|
24
|
-
|
39
|
+
|
40
|
+
<div class="webmention__content p-content">
|
41
|
+
{% if webmention.content %}
|
42
|
+
{{ webmention.content }}
|
43
|
+
{% else %}
|
44
|
+
{{ webmention.title }}
|
45
|
+
{% endif %}
|
46
|
+
</div>
|
47
|
+
|
48
|
+
<div class="webmention__meta">
|
49
|
+
{% if webmention.pubdate %}
|
50
|
+
<time class="webmention__pubdate dt-published"
|
51
|
+
datetime="{{ webmention.pubdate | date: '%FT%T%:z' }}">{{ webmention.pubdate | date: '%d %B %Y' }}</time>
|
52
|
+
{% endif %}
|
53
|
+
{% if webmention.pubdate and webmention.uri %}|{% endif %}
|
54
|
+
{% if webmention.uri %}
|
55
|
+
<a class="webmention__source u-url" href="{{ webmention.uri }}" rel="nofollow">Permalink</a>
|
56
|
+
{% endif %}
|
57
|
+
</div>
|
58
|
+
</article>
|
25
59
|
</li>
|
26
60
|
{% endfor %}
|
27
61
|
</ol>
|
28
62
|
{% else %}
|
29
63
|
<p class="webmentions__not-found">No replies were found.</p>
|
30
64
|
{% endif %}
|
31
|
-
</div>
|
65
|
+
</div>
|
@@ -1,17 +1,46 @@
|
|
1
|
-
|
1
|
+
{%- if html_proofer_ignore == "all" -%}
|
2
|
+
{%- assign html_proofer_attr = " data-proofer-ignore" -%}
|
3
|
+
{%- endif -%}
|
4
|
+
<div class="webmentions webmentions--reposts"{{ html_proofer_attr }}>
|
2
5
|
{% if webmentions.size > 0 %}
|
3
6
|
<ol class="webmentions__list">
|
4
7
|
{% for webmention in webmentions %}
|
5
|
-
<li id="webmention-{{ webmention.id }}" class="webmentions__item webmention
|
6
|
-
<
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
8
|
+
<li id="webmention-{{ webmention.id }}" class="webmention webmentions__item webmention--{{ webmention.type }}">
|
9
|
+
<article class="h-cite
|
10
|
+
{% unless webmention.author %}webmention--no-author{% endunless %}
|
11
|
+
{% unless webmention.author.photo %}webmention--no-photo{% endunless %}
|
12
|
+
">
|
13
|
+
{% if webmention.author %}
|
14
|
+
<div class="webmention__author p-author h-card">
|
15
|
+
{% capture author_id %}
|
16
|
+
{% if webmention.author.photo %}
|
17
|
+
<img
|
18
|
+
class="webmention__author__photo u-photo"
|
19
|
+
src="{{ webmention.author.photo }}"
|
20
|
+
alt=""
|
21
|
+
{% if webmention.author.name %}
|
22
|
+
title="{{ webmention.author.name }}"
|
23
|
+
{% endif %}
|
24
|
+
>
|
25
|
+
{% endif %}
|
26
|
+
|
27
|
+
{% if webmention.author.name %}
|
28
|
+
<span class="webmention__author__name p-name">{{ webmention.author.name }}</span>
|
29
|
+
{% endif %}
|
30
|
+
{% endcapture %}
|
31
|
+
|
32
|
+
{% if webmention.author.url %}
|
33
|
+
<a class="u-url" href="{{ webmention.author.url }}" rel="nofollow">{{ author_id }}</a>
|
34
|
+
{% else %}
|
35
|
+
{{ author_id }}
|
36
|
+
{% endif %}
|
37
|
+
</div>
|
38
|
+
{% endif %}
|
39
|
+
</article>
|
11
40
|
</li>
|
12
41
|
{% endfor %}
|
13
42
|
</ol>
|
14
43
|
{% else %}
|
15
44
|
<p class="webmentions__not-found">No reposts were found.</p>
|
16
45
|
{% endif %}
|
17
|
-
</div>
|
46
|
+
</div>
|
@@ -1,19 +1,46 @@
|
|
1
|
-
|
1
|
+
{%- if html_proofer_ignore == "all" -%}
|
2
|
+
{%- assign html_proofer_attr = " data-proofer-ignore" -%}
|
3
|
+
{%- endif -%}
|
4
|
+
<div class="webmentions webmentions--rsvps"{{ html_proofer_attr }}>
|
2
5
|
{% if webmentions.size > 0 %}
|
3
6
|
<ol class="webmentions__list">
|
4
7
|
{% for webmention in webmentions %}
|
5
|
-
<li id="webmention-{{ webmention.id }}" class="webmentions__item webmention
|
6
|
-
<
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
8
|
+
<li id="webmention-{{ webmention.id }}" class="webmention webmentions__item webmention--{{ webmention.type }}">
|
9
|
+
<article class="h-cite
|
10
|
+
{% unless webmention.author %}webmention--no-author{% endunless %}
|
11
|
+
{% unless webmention.author.photo %}webmention--no-photo{% endunless %}
|
12
|
+
">
|
13
|
+
{% if webmention.author %}
|
14
|
+
<div class="webmention__author p-author h-card">
|
15
|
+
{% capture author_id %}
|
16
|
+
{% if webmention.author.photo %}
|
17
|
+
<img
|
18
|
+
class="webmention__author__photo u-photo"
|
19
|
+
src="{{ webmention.author.photo }}"
|
20
|
+
alt=""
|
21
|
+
{% if webmention.author.name %}
|
22
|
+
title="{{ webmention.author.name }}"
|
23
|
+
{% endif %}
|
24
|
+
>
|
25
|
+
{% endif %}
|
26
|
+
|
27
|
+
{% if webmention.author.name %}
|
28
|
+
<span class="webmention__author__name p-name">{{ webmention.author.name }}</span>
|
29
|
+
{% endif %}
|
30
|
+
{% endcapture %}
|
31
|
+
|
32
|
+
{% if webmention.author.url %}
|
33
|
+
<a class="u-url" href="{{ webmention.author.url }}" rel="nofollow">{{ author_id }}</a>
|
34
|
+
{% else %}
|
35
|
+
{{ author_id }}
|
36
|
+
{% endif %}
|
37
|
+
</div>
|
38
|
+
{% endif %}
|
39
|
+
</article>
|
13
40
|
</li>
|
14
41
|
{% endfor %}
|
15
42
|
</ol>
|
16
43
|
{% else %}
|
17
44
|
<p class="webmentions__not-found">No RSVPs were found.</p>
|
18
45
|
{% endif %}
|
19
|
-
</div>
|
46
|
+
</div>
|
@@ -1,23 +1,42 @@
|
|
1
1
|
{% capture webmention_types %}{{ types | join: ',' }}{% endcapture %}
|
2
|
-
|
2
|
+
|
3
|
+
{%- if html_proofer_ignore == "all" -%}
|
4
|
+
{%- assign html_proofer_attr = " data-proofer-ignore" -%}
|
5
|
+
{%- endif -%}
|
6
|
+
<div class="webmentions"{{ html_proofer_attr }}{% unless webmention_types=="" %} data-webmention-types="{{ webmention_types }}"{% endunless %}>
|
3
7
|
{% if webmentions.size > 0 %}
|
4
8
|
<ol class="webmentions__list">
|
5
9
|
{% for webmention in webmentions %}
|
6
|
-
<li id="webmention-{{ webmention.id }}" class="webmentions__item">
|
7
|
-
<article class="h-cite
|
10
|
+
<li id="webmention-{{ webmention.id }}" class="webmention webmentions__item webmention--{{ webmention.type }}">
|
11
|
+
<article class="h-cite
|
8
12
|
{% unless webmention.author %}webmention--no-author{% endunless %}
|
9
13
|
{% unless webmention.author.photo %}webmention--no-photo{% endunless %}
|
10
|
-
{% if webmention.source=='twitter' %}{% if webmention.type=='like' or webmention.type=='repost' %}webmention--author-starts{% endif %}{% endif %}
|
11
14
|
">
|
12
15
|
{% if webmention.author %}
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
16
|
+
<div class="webmention__author p-author h-card">
|
17
|
+
{% capture author_id %}
|
18
|
+
{% if webmention.author.photo %}
|
19
|
+
<img
|
20
|
+
class="webmention__author__photo u-photo"
|
21
|
+
src="{{ webmention.author.photo }}"
|
22
|
+
alt=""
|
23
|
+
{% if webmention.author.name %}
|
24
|
+
title="{{ webmention.author.name }}"
|
25
|
+
{% endif %}
|
26
|
+
>
|
27
|
+
{% endif %}
|
28
|
+
|
29
|
+
{% if webmention.author.name %}
|
30
|
+
<span class="webmention__author__name p-name">{{ webmention.author.name }}</span>
|
31
|
+
{% endif %}
|
32
|
+
{% endcapture %}
|
33
|
+
|
34
|
+
{% if webmention.author.url %}
|
35
|
+
<a class="u-url" href="{{ webmention.author.url }}" rel="nofollow">{{ author_id }}</a>
|
36
|
+
{% else %}
|
37
|
+
{{ author_id }}
|
38
|
+
{% endif %}
|
39
|
+
</div>
|
21
40
|
{% endif %}
|
22
41
|
|
23
42
|
<div class="webmention__content p-content">
|
@@ -27,15 +46,15 @@
|
|
27
46
|
{{ webmention.title }}
|
28
47
|
{% endif %}
|
29
48
|
</div>
|
30
|
-
|
49
|
+
|
31
50
|
<div class="webmention__meta">
|
32
51
|
{% if webmention.pubdate %}
|
33
52
|
<time class="webmention__pubdate dt-published"
|
34
53
|
datetime="{{ webmention.pubdate | date: '%FT%T%:z' }}">{{ webmention.pubdate | date: '%d %B %Y' }}</time>
|
35
54
|
{% endif %}
|
36
|
-
{% if webmention.pubdate and webmention.
|
37
|
-
{% if webmention.
|
38
|
-
<a class="webmention__source u-url" href="{{ webmention.
|
55
|
+
{% if webmention.pubdate and webmention.uri %}|{% endif %}
|
56
|
+
{% if webmention.uri %}
|
57
|
+
<a class="webmention__source u-url" href="{{ webmention.uri }}" rel="nofollow">Permalink</a>
|
39
58
|
{% endif %}
|
40
59
|
</div>
|
41
60
|
</article>
|
@@ -45,4 +64,4 @@
|
|
45
64
|
{% else %}
|
46
65
|
<p class="webmentions__not-found">No webmentions were found.</p>
|
47
66
|
{% endif %}
|
48
|
-
</div>
|
67
|
+
</div>
|
data/lib/jekyll/webmention_io.rb
CHANGED
@@ -95,6 +95,12 @@ module Jekyll
|
|
95
95
|
.fetch("bad_uri_policy", {})
|
96
96
|
.fetch("blacklist", [])
|
97
97
|
.map { |expr| Regexp.new(expr) }
|
98
|
+
|
99
|
+
# Backward compatibility config for html_proofer setting
|
100
|
+
|
101
|
+
if @config['html_proofer'] == true
|
102
|
+
@config['html_proofer_ignore'] = "templates"
|
103
|
+
end
|
98
104
|
end
|
99
105
|
|
100
106
|
# Setter
|
@@ -304,7 +310,8 @@ module Jekyll
|
|
304
310
|
end
|
305
311
|
|
306
312
|
def self.html_templates
|
307
|
-
|
313
|
+
setting = @config['html_proofer_ignore']
|
314
|
+
proofer = if setting == "all" || setting == "templates"
|
308
315
|
' data-proofer-ignore'
|
309
316
|
else
|
310
317
|
''
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-webmention_io
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Gustafson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -317,7 +317,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
317
317
|
- !ruby/object:Gem::Version
|
318
318
|
version: '0'
|
319
319
|
requirements: []
|
320
|
-
rubygems_version: 3.
|
320
|
+
rubygems_version: 3.4.22
|
321
321
|
signing_key:
|
322
322
|
specification_version: 4
|
323
323
|
summary: A Jekyll plugin for sending & receiving webmentions via Webmention.io.
|