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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '09dd03eeea574cdb024da147de7b2be165209a645a600aa709a650975b10d1b0'
4
- data.tar.gz: 8493598855950605e57eb6142fa4e4a9e3f9b5b09323b100ed6823192ef3ece1
3
+ metadata.gz: cc9d31a7e443e2a0b12a6d4b5ce65fff675e8302113f751eff6b5bbde3d090e3
4
+ data.tar.gz: 3c57fc8d14d3345def7d2bd432745fbcd9551d9931adc7ea870d7ae7ed638f6f
5
5
  SHA512:
6
- metadata.gz: de0de587f76d245329a31d2800b7e9d4e53bfc7bbdf318e3adeaef0ade095c2ae865e670510e18d0ca77a32398f9eb7060b9a6acbf2afb78a4d62708576ab015
7
- data.tar.gz: d3113c40d8d9674f5b842ce2f2ce777d33cfe3abab46ee1dc97474f2eb0788ea1cd7f8c60699dc0dcf10563cec3ac8963f3fc6715f64f0bfddabdba8b7455a53
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 theres a generic, add it there too
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));
@@ -1,7 +1,7 @@
1
1
  // @ts-check
2
2
  /**
3
3
  * WebMentions.io JS
4
- * A re-tooling of Aaron Pareckis recommended JS for using the WebMention.io API
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
- unless uris.key? match
207
- uris[match] = false
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
 
@@ -18,7 +18,7 @@ module Jekyll
18
18
  self.template = "count"
19
19
  end
20
20
 
21
- def set_data(data, types)
21
+ def set_data(data, types, html_proofer_ignore)
22
22
  @data = { "count" => data.length, "types" => types }
23
23
  end
24
24
  end
@@ -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
- <div class="webmentions webmentions--bookmarks">
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 webmention--{{ webmention.type }}">
6
- <div class="webmention__content p-content">
7
- {{ webmention.content }}
8
- </div>
9
- <div class="webmention__meta">
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
- <a class="webmention__author h-card u-url" href="{{ webmention.author.url }}" rel="nofollow">{{ webmention.author.name }}</a>
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
- {% if webmention.pubdate and webmention.url %}on{% endif %}
14
- {% if webmention.pubdate %}
15
- <a class="webmention__source u-url" href="{{ webmention.url }}" rel="nofollow">
16
- <time class="webmention__pubdate dt-published" datetime="{{ webmention.pubdate | date: '%FT%T%:z' }}">{{ webmention.pubdate | date: '%d %B %Y' }}</time>
17
- </a>
18
- {% endif %}
19
- </div>
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
- <div class="webmentions webmentions--likes">
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 webmention--{{ webmention.type }}">
6
- <div class="webmention__author p-author h-card">
7
- <a class="u-url" href="{{ webmention.author.url }}" rel="nofollow">
8
- <img class="webmention__author__photo u-photo" src="{{ webmention.author.photo }}" alt="" title="{{ webmention.author.name }}">
9
- </a>
10
- </div>
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 were found.</p>
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
- <div class="webmentions webmentions--links">
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 webmention--{{ webmention.type }}">
6
- <div class="webmention__content p-content">
7
- {{ webmention.content }}
8
- </div>
9
- <div class="webmention__meta">
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
- <a class="webmention__author h-card u-url" href="{{ webmention.author.url }}" rel="nofollow">{{ webmention.author.name }}</a>
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
- {% if webmention.pubdate and webmention.url %}on{% endif %}
14
- {% if webmention.pubdate %}
15
- <a class="webmention__source u-url" href="{{ webmention.url }}" rel="nofollow">
16
- <time class="webmention__pubdate dt-published" datetime="{{ webmention.pubdate | date: '%FT%T%:z' }}">{{ webmention.pubdate | date: '%d %B %Y' }}</time>
17
- </a>
18
- {% endif %}
19
- </div>
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
- <div class="webmentions webmentions--posts">
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 webmention--{{ webmention.type }}">
6
- <a class="webmention__title webmention__source u-url" href="{{ webmention.url }}" rel="nofollow">{{ webmention.title }}</a>
7
- <div class="webmention__meta">
8
- {% if webmention.pubdate %}
9
- <time class="webmention__pubdate dt-published" datetime="{{ webmention.pubdate | date: '%FT%T%:z' }}">{{ webmention.pubdate | date: '%d %B %Y' }}</time>
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
- </div>
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
- <div class="webmentions webmentions--replies">
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 webmention--{{ webmention.type }}">
6
- <div class="webmention__content p-content">
7
- {{ webmention.content }}
8
- </div>
9
- <div class="webmention__meta">
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
- <a class="webmention__author h-card u-url" href="{{ webmention.author.url }}" rel="nofollow">
14
+ <div class="webmention__author p-author h-card">
15
+ {% capture author_id %}
12
16
  {% if webmention.author.photo %}
13
- <img class="webmention__author__photo u-photo" src="{{ webmention.author.photo }}" alt="" title="{{ webmention.author.name }}">
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
- <b class="p-name">{{ webmention.author.name }}</b>
16
- </a>
17
- {% endif %}
18
- {% if webmention.pubdate and webmention.author %}on{% endif %}
19
- {% if webmention.pubdate %}
20
- <a class="webmention__source u-url" href="{{ webmention.url }}" rel="nofollow">
21
- <time class="webmention__pubdate dt-published" datetime="{{ webmention.pubdate | date: '%FT%T%:z' }}">{{ webmention.pubdate | date: '%d %B %Y' }}</time>
22
- </a>
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
- </div>
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
- <div class="webmentions webmentions--reposts">
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 webmention--{{ webmention.type }}">
6
- <div class="webmention__author p-author h-card">
7
- <a class="u-url" href="{{ webmention.author.url }}" rel="nofollow">
8
- <img class="webmention__author__photo u-photo" src="{{ webmention.author.photo }}" alt="" title="{{ webmention.author.name }}">
9
- </a>
10
- </div>
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
- <div class="webmentions webmentions--rsvps">
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 webmention--{{ webmention.type }}">
6
- <div class="webmention__author p-author h-card">
7
- <a class="u-url" href="{{ webmention.author.url }}" rel="nofollow">
8
- <img class="webmention__author__photo u-photo" src="{{ webmention.author.photo }}" alt="Avatar for {{ webmention.author.name }}" title="{{ webmention.author.name }}">
9
- <b class="p-name">{{ webmention.author.name }}</b>
10
- {{ webmention.content }}
11
- </a>
12
- </div>
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
- <div class="webmentions"{% unless webmention_types=="" %} data-webmention-types="{{ webmention_types }}"{% endunless %}>
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 webmention webmention--{{ webmention.type }}
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
- <div class="webmention__author p-author h-card">
14
- <a class="u-url" href="{{ webmention.author.url }}" rel="nofollow">
15
- {% if webmention.author.photo %}
16
- <img class="webmention__author__photo u-photo" src="{{ webmention.author.photo }}" alt="" title="{{ webmention.author.name }}">
17
- {% endif %}
18
- <b class="p-name">{{ webmention.author.name }}</b>
19
- </a>
20
- </div>
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.url %}|{% endif %}
37
- {% if webmention.url %}
38
- <a class="webmention__source u-url" href="{{ webmention.url }}" rel="nofollow">Permalink</a>
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>
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Jekyll
4
4
  module WebmentionIO
5
- VERSION = "4.0.0"
5
+ VERSION = "4.1.0"
6
6
  end
7
7
  end
@@ -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
- proofer = if @config['html_proofer'] == true
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.0.0
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: 2023-07-06 00:00:00.000000000 Z
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.3.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.