jekyll-webmention_io 3.3.7 → 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/commands/webmention.rb +16 -8
- data/lib/jekyll/generators/compile_js.rb +1 -2
- data/lib/jekyll/generators/queue_webmentions.rb +161 -17
- data/lib/jekyll/tags/count.rb +1 -1
- data/lib/jekyll/tags/webmention.rb +16 -8
- 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/webmention_item.rb +5 -21
- data/lib/jekyll/webmention_io.rb +209 -19
- metadata +28 -8
@@ -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>
|
@@ -50,20 +50,6 @@ module Jekyll
|
|
50
50
|
@content = determine_content
|
51
51
|
end
|
52
52
|
|
53
|
-
def markdownify(string)
|
54
|
-
@converter ||= @site.find_converter_instance(Jekyll::Converters::Markdown)
|
55
|
-
|
56
|
-
if string
|
57
|
-
string = @converter.convert(string.to_s)
|
58
|
-
unless string.start_with?("<p")
|
59
|
-
string = string.sub(/^<[^>]+>/, "<p>").sub(/<\/[^>]+>$/, "</p>")
|
60
|
-
end
|
61
|
-
string.strip
|
62
|
-
else
|
63
|
-
string
|
64
|
-
end
|
65
|
-
end
|
66
|
-
|
67
53
|
def determine_uri
|
68
54
|
@raw["data"]["url"] || @raw["source"]
|
69
55
|
end
|
@@ -164,13 +150,11 @@ module Jekyll
|
|
164
150
|
end
|
165
151
|
|
166
152
|
def determine_content
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
markdownify(content)
|
153
|
+
if %w(post reply link).include? @type
|
154
|
+
@raw.dig("data", "content")
|
155
|
+
else
|
156
|
+
@raw.dig("activity", "sentence_html")
|
157
|
+
end
|
174
158
|
end
|
175
159
|
end
|
176
160
|
end
|