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.
@@ -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 = "3.3.7"
5
+ VERSION = "4.1.0"
6
6
  end
7
7
  end
@@ -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
- content = if %w(post reply link).include? @type
168
- @raw.dig("data", "content")
169
- else
170
- @raw.dig("activity", "sentence_html")
171
- end
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