jekyll-seo-tag 2.8.0 → 2.9.1
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/.github/workflows/ci.yml +9 -9
- data/.github/workflows/release.yml +1 -1
- data/.github/workflows/third-party.yml +4 -3
- data/History.markdown +33 -0
- data/docs/README.md +1 -1
- data/docs/advanced-usage.md +55 -1
- data/lib/jekyll-seo-tag/drop.rb +29 -2
- data/lib/jekyll-seo-tag/image_drop.rb +11 -6
- data/lib/jekyll-seo-tag/json_filters.rb +26 -0
- data/lib/jekyll-seo-tag/version.rb +1 -1
- data/lib/jekyll-seo-tag.rb +3 -2
- data/lib/template.html +36 -33
- metadata +7 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dbad211fe69342707356ae1396328e40f6d0c14f0568500f1618fb1cea736435
|
|
4
|
+
data.tar.gz: 03a10838603f66d37891bb919d0a170b968de42553bee688721b4f6ad455800f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f81c5cf300ff43b6a2cf93da21428cb6e5479b15d446abf6f4f5219cd1f9d728c191792a1329037bcaf619230c68c2a86a428880e376d3f56e396872db683eec
|
|
7
|
+
data.tar.gz: 052b68ba6509c071cf6280b92dde6c9a3c1709e6137a68ed89339db2420025c200a04ce156e389100cd93c5ccf1f1a1d38e23a857cb1283d3ce1d3b50cada47b
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -19,13 +19,13 @@ jobs:
|
|
|
19
19
|
fail-fast: false
|
|
20
20
|
matrix:
|
|
21
21
|
ruby_version:
|
|
22
|
-
- 2.5
|
|
23
22
|
- 2.7
|
|
24
|
-
- 3.
|
|
23
|
+
- 3.3
|
|
24
|
+
- 3.4
|
|
25
25
|
jekyll_version:
|
|
26
26
|
- "~> 4.0"
|
|
27
27
|
steps:
|
|
28
|
-
- uses: actions/checkout@
|
|
28
|
+
- uses: actions/checkout@v4
|
|
29
29
|
with:
|
|
30
30
|
fetch-depth: 5
|
|
31
31
|
- name: "Set up Ruby ${{ matrix.ruby_version }}"
|
|
@@ -45,11 +45,11 @@ jobs:
|
|
|
45
45
|
fail-fast: false
|
|
46
46
|
matrix:
|
|
47
47
|
ruby_version:
|
|
48
|
-
- 2.
|
|
48
|
+
- 2.7
|
|
49
49
|
jekyll_version:
|
|
50
50
|
- "~> 3.9"
|
|
51
51
|
steps:
|
|
52
|
-
- uses: actions/checkout@
|
|
52
|
+
- uses: actions/checkout@v4
|
|
53
53
|
with:
|
|
54
54
|
fetch-depth: 5
|
|
55
55
|
- name: "Set up Ruby ${{ matrix.ruby_version }}"
|
|
@@ -68,9 +68,9 @@ jobs:
|
|
|
68
68
|
fail-fast: false
|
|
69
69
|
matrix:
|
|
70
70
|
ruby_version:
|
|
71
|
-
- 2.
|
|
71
|
+
- 2.7
|
|
72
72
|
steps:
|
|
73
|
-
- uses: actions/checkout@
|
|
73
|
+
- uses: actions/checkout@v4
|
|
74
74
|
with:
|
|
75
75
|
fetch-depth: 5
|
|
76
76
|
- name: "Set up Ruby ${{ matrix.ruby_version }}"
|
|
@@ -89,9 +89,9 @@ jobs:
|
|
|
89
89
|
fail-fast: false
|
|
90
90
|
matrix:
|
|
91
91
|
ruby_version:
|
|
92
|
-
- 2.
|
|
92
|
+
- 2.7
|
|
93
93
|
steps:
|
|
94
|
-
- uses: actions/checkout@
|
|
94
|
+
- uses: actions/checkout@v4
|
|
95
95
|
with:
|
|
96
96
|
fetch-depth: 5
|
|
97
97
|
- name: "Set up Ruby ${{ matrix.ruby_version }}"
|
|
@@ -27,18 +27,18 @@ jobs:
|
|
|
27
27
|
JEKYLL_VERSION: ${{ matrix.jekyll_version }}
|
|
28
28
|
steps:
|
|
29
29
|
- name: Checkout Jekyll SEO Tag
|
|
30
|
-
uses: actions/checkout@
|
|
30
|
+
uses: actions/checkout@v4
|
|
31
31
|
with:
|
|
32
32
|
fetch-depth: 5
|
|
33
33
|
path: jekyll-seo-tag
|
|
34
34
|
- name: Checkout Third-Party Repository (WITHOUT SEO Tag)
|
|
35
|
-
uses: actions/checkout@
|
|
35
|
+
uses: actions/checkout@v4
|
|
36
36
|
with:
|
|
37
37
|
repository: ashmaroli/tomjoht.github.io
|
|
38
38
|
ref: "no-seo-tag"
|
|
39
39
|
path: alpha-sandbox
|
|
40
40
|
- name: Checkout Same Third-Party Repository (WITH SEO Tag)
|
|
41
|
-
uses: actions/checkout@
|
|
41
|
+
uses: actions/checkout@v4
|
|
42
42
|
with:
|
|
43
43
|
repository: ashmaroli/tomjoht.github.io
|
|
44
44
|
ref: "seo-tag"
|
|
@@ -60,3 +60,4 @@ jobs:
|
|
|
60
60
|
bundle exec jekyll build -s sandbox -d sandbox/_site --trace
|
|
61
61
|
- name: Memory Analysis of Jekyll Build (WITH SEO Tag)
|
|
62
62
|
run: bash jekyll-seo-tag/.github/workflows/scripts/memprof
|
|
63
|
+
if: "!contains(matrix.jekyll_version, '3.')"
|
data/History.markdown
CHANGED
|
@@ -1,3 +1,36 @@
|
|
|
1
|
+
## 2.9.1 / 2026-09-29
|
|
2
|
+
|
|
3
|
+
### Security
|
|
4
|
+
|
|
5
|
+
* Escape all metadata attribute outputs, and make the JSON-LD block safe inside its script tag (GHSA-572m-7cg5-6j5r)
|
|
6
|
+
|
|
7
|
+
## 2.9.0 / 2026-05-08
|
|
8
|
+
|
|
9
|
+
### Minor Enhancements
|
|
10
|
+
|
|
11
|
+
* Added the `twitter:description` tag (#464)
|
|
12
|
+
* Support for image paths relative to the page's directory (#466)
|
|
13
|
+
* Truncate the description value to 100 words (#492)
|
|
14
|
+
* Add support for title_category (#517)
|
|
15
|
+
* feat: Add canonical=false option to disable canonical URL output (#521)
|
|
16
|
+
* Add a article:modified_time property for articles (#515)
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* Use attribute `name` consistently for metadata under `twitter` namespace (#437)
|
|
21
|
+
|
|
22
|
+
### Documentation
|
|
23
|
+
|
|
24
|
+
* Migrate build badge to GH Actions (#499)
|
|
25
|
+
|
|
26
|
+
### Development Fixes
|
|
27
|
+
|
|
28
|
+
* Add Ruby 3.1 to CI matrix (#459)
|
|
29
|
+
* chore: remove git.io (#462)
|
|
30
|
+
* Bump versions in workflows (#516)
|
|
31
|
+
* fix: Fix rubocop offenses (#518)
|
|
32
|
+
|
|
33
|
+
|
|
1
34
|
## 2.8.0 / 2022-02-04
|
|
2
35
|
|
|
3
36
|
### Minor Enhancements
|
data/docs/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
A Jekyll plugin to add metadata tags for search engines and social networks to better index and display your site's content.
|
|
4
4
|
|
|
5
|
-
[](https://badge.fury.io/rb/jekyll-seo-tag) [](https://badge.fury.io/rb/jekyll-seo-tag) [](https://github.com/jekyll/jekyll-seo-tag/actions/workflows/ci.yml)
|
|
6
6
|
|
|
7
7
|
## What it does
|
|
8
8
|
|
data/docs/advanced-usage.md
CHANGED
|
@@ -12,6 +12,18 @@ If for some reason, you don't want the plugin to output `<title>` tags on each p
|
|
|
12
12
|
```
|
|
13
13
|
<!-- {% endraw %} -->
|
|
14
14
|
|
|
15
|
+
### Disabling `<link rel="canonical">` output
|
|
16
|
+
|
|
17
|
+
If you're using another plugin to generate canonical URLs (such as [jekyll-polyglot](https://github.com/untra/polyglot) for multilingual sites), you can disable the canonical URL output:
|
|
18
|
+
|
|
19
|
+
<!-- {% raw %} -->
|
|
20
|
+
```
|
|
21
|
+
{% seo canonical=false %}
|
|
22
|
+
```
|
|
23
|
+
<!-- {% endraw %} -->
|
|
24
|
+
|
|
25
|
+
This will prevent the plugin from outputting the `<link rel="canonical">` tag, while still outputting all other SEO tags including the `<meta property="og:url">` tag.
|
|
26
|
+
|
|
15
27
|
### Author information
|
|
16
28
|
|
|
17
29
|
Author information is used to propagate the `creator` field of Twitter summary cards. This should be an author-specific, not site-wide Twitter handle (the site-wide username be stored as `site.twitter.username`).
|
|
@@ -80,6 +92,27 @@ You can set it the same way as the other author properties. For example, you can
|
|
|
80
92
|
url: https://example.com/
|
|
81
93
|
```
|
|
82
94
|
|
|
95
|
+
### Customizing description length
|
|
96
|
+
|
|
97
|
+
By default, the description is limited to the first 100 words of the full content.
|
|
98
|
+
|
|
99
|
+
You can adjust this limit at the page level, by using the `seo_description_max_words` page property:
|
|
100
|
+
|
|
101
|
+
```yml
|
|
102
|
+
seo_description_max_words: 200
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
You can also set a default site-wide value for all pages using [Front Matter defaults](https://jekyllrb.com/docs/configuration/front-matter-defaults/) in your `_config.yml` file:
|
|
106
|
+
|
|
107
|
+
```yml
|
|
108
|
+
defaults:
|
|
109
|
+
- scope:
|
|
110
|
+
path: ""
|
|
111
|
+
values:
|
|
112
|
+
seo_description_max_words: 200
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
|
|
83
116
|
### Customizing JSON-LD output
|
|
84
117
|
|
|
85
118
|
The following options can be set for any particular page. While the default options are meant to serve most users in the most common circumstances, there may be situations where more precise control is necessary.
|
|
@@ -89,7 +122,7 @@ The following options can be set for any particular page. While the default opti
|
|
|
89
122
|
* `type` - The type of things that the page represents. This must be a [Schema.org type](https://schema.org/docs/schemas.html), and will probably usually be something like [`BlogPosting`](https://schema.org/BlogPosting), [`NewsArticle`](https://schema.org/NewsArticle), [`Person`](https://schema.org/Person), [`Organization`](https://schema.org/Organization), etc.
|
|
90
123
|
* `links` - An array of other URLs that represent the same thing that this page represents. For instance, Jane's bio page might include links to Jane's GitHub and Twitter profiles.
|
|
91
124
|
* `date_modified` - Manually specify the `dateModified` field in the JSON-LD output to override Jekyll's own `dateModified`.
|
|
92
|
-
This field will take **first priority** for the `dateModified` JSON-LD output. This is useful when the file timestamp does not match the true time that the content was modified. A user may also install [Last Modified At](https://github.com/gjtorikian/jekyll-last-modified-at) which will offer an alternative way of providing for the `dateModified` field.
|
|
125
|
+
This field will take **first priority** for the `dateModified` JSON-LD output and the article modification time for Open Graph (`article:modified_time`). This is useful when the file timestamp does not match the true time that the content was modified. A user may also install [Last Modified At](https://github.com/gjtorikian/jekyll-last-modified-at) which will offer an alternative way of providing for the `dateModified` field.
|
|
93
126
|
|
|
94
127
|
### Customizing image output
|
|
95
128
|
|
|
@@ -168,3 +201,24 @@ seo_paginator_message: "%<current>s / %<total>s | "
|
|
|
168
201
|
|
|
169
202
|
While the value can be any string text, we recommend using a Ruby string-template containing the variables `current` and `total`
|
|
170
203
|
similar to the example above, to incorporate the current page-number and total number of paginated pages in the title.
|
|
204
|
+
|
|
205
|
+
### Adding a page title category
|
|
206
|
+
|
|
207
|
+
You can optionally add a page category to its title.
|
|
208
|
+
This is useful for indicating to the users that some pages are logically grouped or are of a specific kind.
|
|
209
|
+
|
|
210
|
+
For example page front matter including:
|
|
211
|
+
|
|
212
|
+
```yml
|
|
213
|
+
title: "my page"
|
|
214
|
+
title_category: "category"
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
And `_config.yml` including:
|
|
218
|
+
|
|
219
|
+
```yml
|
|
220
|
+
title: "my site"
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
Will generate `my page | category | my site` as the page's main `<title>` tag
|
|
224
|
+
and `my page | category` as all other page's title declarations like `og:title`.
|
data/lib/jekyll-seo-tag/drop.rb
CHANGED
|
@@ -33,6 +33,13 @@ module Jekyll
|
|
|
33
33
|
@display_title = (@text !~ %r!title=false!i)
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
+
# Should the `<link rel="canonical">` tag be generated for this page?
|
|
37
|
+
def canonical?
|
|
38
|
+
return @canonical if defined?(@canonical)
|
|
39
|
+
|
|
40
|
+
@canonical = (@text !~ %r!canonical=false!i)
|
|
41
|
+
end
|
|
42
|
+
|
|
36
43
|
def site_title
|
|
37
44
|
@site_title ||= format_string(site["title"] || site["name"])
|
|
38
45
|
end
|
|
@@ -47,7 +54,15 @@ module Jekyll
|
|
|
47
54
|
|
|
48
55
|
# Page title without site title or description appended
|
|
49
56
|
def page_title
|
|
50
|
-
@page_title
|
|
57
|
+
return @page_title if defined?(@page_title)
|
|
58
|
+
|
|
59
|
+
title = format_string(page["title"])
|
|
60
|
+
title_category = format_string(page["title_category"])
|
|
61
|
+
@page_title = if title && title_category && title != title_category
|
|
62
|
+
title + TITLE_SEPARATOR + title_category
|
|
63
|
+
else
|
|
64
|
+
title || title_category || site_title
|
|
65
|
+
end
|
|
51
66
|
end
|
|
52
67
|
|
|
53
68
|
def site_tagline_or_description
|
|
@@ -89,7 +104,8 @@ module Jekyll
|
|
|
89
104
|
|
|
90
105
|
def description
|
|
91
106
|
@description ||= begin
|
|
92
|
-
format_string(page["description"] || page["excerpt"]) || site_description
|
|
107
|
+
value = format_string(page["description"] || page["excerpt"]) || site_description
|
|
108
|
+
snippet(value, description_max_words)
|
|
93
109
|
end
|
|
94
110
|
end
|
|
95
111
|
|
|
@@ -175,6 +191,10 @@ module Jekyll
|
|
|
175
191
|
end
|
|
176
192
|
end
|
|
177
193
|
|
|
194
|
+
def description_max_words
|
|
195
|
+
@description_max_words ||= page["seo_description_max_words"] || 100
|
|
196
|
+
end
|
|
197
|
+
|
|
178
198
|
private
|
|
179
199
|
|
|
180
200
|
def filters
|
|
@@ -217,6 +237,13 @@ module Jekyll
|
|
|
217
237
|
string unless string.empty?
|
|
218
238
|
end
|
|
219
239
|
|
|
240
|
+
def snippet(string, max_words)
|
|
241
|
+
return string if string.nil?
|
|
242
|
+
|
|
243
|
+
result = string.split(%r!\s+!, max_words + 1)[0...max_words].join(" ")
|
|
244
|
+
result.length < string.length ? result.concat("…") : result
|
|
245
|
+
end
|
|
246
|
+
|
|
220
247
|
def seo_name
|
|
221
248
|
@seo_name ||= format_string(page_seo["name"]) if page_seo["name"]
|
|
222
249
|
end
|
|
@@ -61,13 +61,18 @@ module Jekyll
|
|
|
61
61
|
|
|
62
62
|
def absolute_url
|
|
63
63
|
return unless raw_path
|
|
64
|
-
return @absolute_url if defined? @absolute_url
|
|
65
64
|
|
|
66
|
-
@absolute_url
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
65
|
+
@absolute_url ||= build_absolute_path
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
def build_absolute_path
|
|
69
|
+
return raw_path unless raw_path.is_a?(String) && absolute_url?(raw_path) == false
|
|
70
|
+
return filters.absolute_url(raw_path) if raw_path.start_with?("/")
|
|
71
|
+
|
|
72
|
+
page_dir = @page["url"]
|
|
73
|
+
page_dir = File.dirname(page_dir) unless page_dir.end_with?("/")
|
|
74
|
+
|
|
75
|
+
filters.absolute_url File.join(page_dir, raw_path)
|
|
71
76
|
end
|
|
72
77
|
|
|
73
78
|
def filters
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Jekyll
|
|
4
|
+
class SeoTag
|
|
5
|
+
# Liquid filters used by the SEO tag template
|
|
6
|
+
module JSONFilters
|
|
7
|
+
# Characters which could end a <script> element or start an HTML comment
|
|
8
|
+
# within it, plus the line terminators which are invalid in JavaScript
|
|
9
|
+
# strings. They can only appear inside JSON strings, where they are
|
|
10
|
+
# replaced by their equivalent \u escapes.
|
|
11
|
+
JSON_ESCAPE = {
|
|
12
|
+
"<" => "\\u003c",
|
|
13
|
+
">" => "\\u003e",
|
|
14
|
+
"&" => "\\u0026",
|
|
15
|
+
"\u2028" => "\\u2028",
|
|
16
|
+
"\u2029" => "\\u2029",
|
|
17
|
+
}.freeze
|
|
18
|
+
JSON_ESCAPE_REGEX = Regexp.union(JSON_ESCAPE.keys).freeze
|
|
19
|
+
|
|
20
|
+
# Makes a JSON string safe to embed in an HTML <script> element
|
|
21
|
+
def seo_json_escape(input)
|
|
22
|
+
input.to_s.gsub(JSON_ESCAPE_REGEX, JSON_ESCAPE)
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
data/lib/jekyll-seo-tag.rb
CHANGED
|
@@ -12,6 +12,7 @@ module Jekyll
|
|
|
12
12
|
autoload :UrlHelper, "jekyll-seo-tag/url_helper"
|
|
13
13
|
autoload :Drop, "jekyll-seo-tag/drop"
|
|
14
14
|
autoload :Filters, "jekyll-seo-tag/filters"
|
|
15
|
+
autoload :JSONFilters, "jekyll-seo-tag/json_filters"
|
|
15
16
|
|
|
16
17
|
attr_accessor :context
|
|
17
18
|
|
|
@@ -46,7 +47,7 @@ module Jekyll
|
|
|
46
47
|
end
|
|
47
48
|
|
|
48
49
|
def payload
|
|
49
|
-
# site_payload is an instance of UnifiedPayloadDrop. See https://
|
|
50
|
+
# site_payload is an instance of UnifiedPayloadDrop. See https://github.com/jekyll/jekyll/blob/22f2724a1f117a94cc16d18c499a93d5915ede4f/lib/jekyll/site.rb#L261-L276
|
|
50
51
|
context.registers[:site].site_payload.tap do |site_payload|
|
|
51
52
|
site_payload["page"] = context.registers[:page]
|
|
52
53
|
site_payload["paginator"] = context["paginator"]
|
|
@@ -65,7 +66,7 @@ module Jekyll
|
|
|
65
66
|
def info
|
|
66
67
|
{
|
|
67
68
|
:registers => context.registers,
|
|
68
|
-
:filters => [Jekyll::Filters],
|
|
69
|
+
:filters => [Jekyll::Filters, JSONFilters],
|
|
69
70
|
}
|
|
70
71
|
end
|
|
71
72
|
|
data/lib/template.html
CHANGED
|
@@ -6,123 +6,126 @@
|
|
|
6
6
|
<meta name="generator" content="Jekyll v{{ jekyll.version }}" />
|
|
7
7
|
|
|
8
8
|
{% if seo_tag.page_title %}
|
|
9
|
-
<meta property="og:title" content="{{ seo_tag.page_title }}" />
|
|
9
|
+
<meta property="og:title" content="{{ seo_tag.page_title | escape_once }}" />
|
|
10
10
|
{% endif %}
|
|
11
11
|
|
|
12
12
|
{% if seo_tag.author.name %}
|
|
13
|
-
<meta name="author" content="{{ seo_tag.author.name }}" />
|
|
13
|
+
<meta name="author" content="{{ seo_tag.author.name | escape_once }}" />
|
|
14
14
|
{% endif %}
|
|
15
15
|
|
|
16
|
-
<meta property="og:locale" content="{{ seo_tag.page_locale }}" />
|
|
16
|
+
<meta property="og:locale" content="{{ seo_tag.page_locale | escape_once }}" />
|
|
17
17
|
|
|
18
18
|
{% if seo_tag.description %}
|
|
19
|
-
<meta name="description" content="{{ seo_tag.description }}" />
|
|
20
|
-
<meta property="og:description" content="{{ seo_tag.description }}" />
|
|
19
|
+
<meta name="description" content="{{ seo_tag.description | escape_once }}" />
|
|
20
|
+
<meta name="twitter:description" property="og:description" content="{{ seo_tag.description | escape_once }}" />
|
|
21
21
|
{% endif %}
|
|
22
22
|
|
|
23
23
|
{% if site.url %}
|
|
24
|
-
<link rel="canonical" href="{{ seo_tag.canonical_url }}" />
|
|
25
|
-
<meta property="og:url" content="{{ seo_tag.canonical_url }}" />
|
|
24
|
+
{% if seo_tag.canonical? %}<link rel="canonical" href="{{ seo_tag.canonical_url | escape_once }}" />
|
|
25
|
+
{% endif %}<meta property="og:url" content="{{ seo_tag.canonical_url | escape_once }}" />
|
|
26
26
|
{% endif %}
|
|
27
27
|
|
|
28
28
|
{% if seo_tag.site_title %}
|
|
29
|
-
<meta property="og:site_name" content="{{ seo_tag.site_title }}" />
|
|
29
|
+
<meta property="og:site_name" content="{{ seo_tag.site_title | escape_once }}" />
|
|
30
30
|
{% endif %}
|
|
31
31
|
|
|
32
32
|
{% if seo_tag.image %}
|
|
33
|
-
<meta property="og:image" content="{{ seo_tag.image.path }}" />
|
|
33
|
+
<meta property="og:image" content="{{ seo_tag.image.path | escape_once }}" />
|
|
34
34
|
{% if seo_tag.image.height %}
|
|
35
|
-
<meta property="og:image:height" content="{{ seo_tag.image.height }}" />
|
|
35
|
+
<meta property="og:image:height" content="{{ seo_tag.image.height | escape_once }}" />
|
|
36
36
|
{% endif %}
|
|
37
37
|
{% if seo_tag.image.width %}
|
|
38
|
-
<meta property="og:image:width" content="{{ seo_tag.image.width }}" />
|
|
38
|
+
<meta property="og:image:width" content="{{ seo_tag.image.width | escape_once }}" />
|
|
39
39
|
{% endif %}
|
|
40
40
|
{% if seo_tag.image.alt %}
|
|
41
|
-
<meta property="og:image:alt" content="{{ seo_tag.image.alt }}" />
|
|
41
|
+
<meta property="og:image:alt" content="{{ seo_tag.image.alt | escape_once }}" />
|
|
42
42
|
{% endif %}
|
|
43
43
|
{% endif %}
|
|
44
44
|
|
|
45
|
-
{% if
|
|
45
|
+
{% if seo_tag.date_published %}
|
|
46
46
|
<meta property="og:type" content="article" />
|
|
47
|
-
<meta property="article:published_time" content="{{
|
|
47
|
+
<meta property="article:published_time" content="{{ seo_tag.date_published | date_to_xmlschema }}" />
|
|
48
|
+
{% if seo_tag.date_modified %}
|
|
49
|
+
<meta property="article:modified_time" content="{{ seo_tag.date_modified | date_to_xmlschema }}" />
|
|
50
|
+
{% endif %}
|
|
48
51
|
{% else %}
|
|
49
52
|
<meta property="og:type" content="website" />
|
|
50
53
|
{% endif %}
|
|
51
54
|
|
|
52
55
|
{% if paginator.previous_page %}
|
|
53
|
-
<link rel="prev" href="{{ paginator.previous_page_path | absolute_url }}" />
|
|
56
|
+
<link rel="prev" href="{{ paginator.previous_page_path | absolute_url | escape_once }}" />
|
|
54
57
|
{% endif %}
|
|
55
58
|
{% if paginator.next_page %}
|
|
56
|
-
<link rel="next" href="{{ paginator.next_page_path | absolute_url }}" />
|
|
59
|
+
<link rel="next" href="{{ paginator.next_page_path | absolute_url | escape_once }}" />
|
|
57
60
|
{% endif %}
|
|
58
61
|
|
|
59
62
|
{% if seo_tag.image %}
|
|
60
|
-
<meta name="twitter:card" content="{{ page.twitter.card | default: site.twitter.card | default: "summary_large_image" }}" />
|
|
61
|
-
<meta
|
|
63
|
+
<meta name="twitter:card" content="{{ page.twitter.card | default: site.twitter.card | default: "summary_large_image" | escape_once }}" />
|
|
64
|
+
<meta name="twitter:image" content="{{ seo_tag.image.path | escape_once }}" />
|
|
62
65
|
{% else %}
|
|
63
66
|
<meta name="twitter:card" content="summary" />
|
|
64
67
|
{% endif %}
|
|
65
68
|
|
|
66
69
|
{% if seo_tag.image.alt %}
|
|
67
|
-
<meta name="twitter:image:alt" content="{{ seo_tag.image.alt }}" />
|
|
70
|
+
<meta name="twitter:image:alt" content="{{ seo_tag.image.alt | escape_once }}" />
|
|
68
71
|
{% endif %}
|
|
69
72
|
|
|
70
73
|
{% if seo_tag.page_title %}
|
|
71
|
-
<meta
|
|
74
|
+
<meta name="twitter:title" content="{{ seo_tag.page_title | escape_once }}" />
|
|
72
75
|
{% endif %}
|
|
73
76
|
|
|
74
77
|
{% if site.twitter %}
|
|
75
|
-
<meta name="twitter:site" content="@{{ site.twitter.username | remove:'@' }}" />
|
|
78
|
+
<meta name="twitter:site" content="@{{ site.twitter.username | remove:'@' | escape_once }}" />
|
|
76
79
|
|
|
77
80
|
{% if seo_tag.author.twitter %}
|
|
78
|
-
<meta name="twitter:creator" content="@{{ seo_tag.author.twitter | remove:'@' }}" />
|
|
81
|
+
<meta name="twitter:creator" content="@{{ seo_tag.author.twitter | remove:'@' | escape_once }}" />
|
|
79
82
|
{% endif %}
|
|
80
83
|
{% endif %}
|
|
81
84
|
|
|
82
85
|
{% if site.facebook %}
|
|
83
86
|
{% if site.facebook.admins %}
|
|
84
|
-
<meta property="fb:admins" content="{{ site.facebook.admins }}" />
|
|
87
|
+
<meta property="fb:admins" content="{{ site.facebook.admins | escape_once }}" />
|
|
85
88
|
{% endif %}
|
|
86
89
|
|
|
87
90
|
{% if site.facebook.publisher %}
|
|
88
|
-
<meta property="article:publisher" content="{{ site.facebook.publisher }}" />
|
|
91
|
+
<meta property="article:publisher" content="{{ site.facebook.publisher | escape_once }}" />
|
|
89
92
|
{% endif %}
|
|
90
93
|
|
|
91
94
|
{% if site.facebook.app_id %}
|
|
92
|
-
<meta property="fb:app_id" content="{{ site.facebook.app_id }}" />
|
|
95
|
+
<meta property="fb:app_id" content="{{ site.facebook.app_id | escape_once }}" />
|
|
93
96
|
{% endif %}
|
|
94
97
|
{% endif %}
|
|
95
98
|
|
|
96
99
|
{% if site.webmaster_verifications %}
|
|
97
100
|
{% if site.webmaster_verifications.google %}
|
|
98
|
-
<meta name="google-site-verification" content="{{ site.webmaster_verifications.google }}" />
|
|
101
|
+
<meta name="google-site-verification" content="{{ site.webmaster_verifications.google | escape_once }}" />
|
|
99
102
|
{% endif %}
|
|
100
103
|
|
|
101
104
|
{% if site.webmaster_verifications.bing %}
|
|
102
|
-
<meta name="msvalidate.01" content="{{ site.webmaster_verifications.bing }}" />
|
|
105
|
+
<meta name="msvalidate.01" content="{{ site.webmaster_verifications.bing | escape_once }}" />
|
|
103
106
|
{% endif %}
|
|
104
107
|
|
|
105
108
|
{% if site.webmaster_verifications.alexa %}
|
|
106
|
-
<meta name="alexaVerifyID" content="{{ site.webmaster_verifications.alexa }}" />
|
|
109
|
+
<meta name="alexaVerifyID" content="{{ site.webmaster_verifications.alexa | escape_once }}" />
|
|
107
110
|
{% endif %}
|
|
108
111
|
|
|
109
112
|
{% if site.webmaster_verifications.yandex %}
|
|
110
|
-
<meta name="yandex-verification" content="{{ site.webmaster_verifications.yandex }}" />
|
|
113
|
+
<meta name="yandex-verification" content="{{ site.webmaster_verifications.yandex | escape_once }}" />
|
|
111
114
|
{% endif %}
|
|
112
115
|
|
|
113
116
|
{% if site.webmaster_verifications.baidu %}
|
|
114
|
-
<meta name="baidu-site-verification" content="{{ site.webmaster_verifications.baidu }}" />
|
|
117
|
+
<meta name="baidu-site-verification" content="{{ site.webmaster_verifications.baidu | escape_once }}" />
|
|
115
118
|
{% endif %}
|
|
116
119
|
|
|
117
120
|
{% if site.webmaster_verifications.facebook %}
|
|
118
|
-
<meta name="facebook-domain-verification" content="{{ site.webmaster_verifications.facebook }}" />
|
|
121
|
+
<meta name="facebook-domain-verification" content="{{ site.webmaster_verifications.facebook | escape_once }}" />
|
|
119
122
|
{% endif %}
|
|
120
123
|
{% elsif site.google_site_verification %}
|
|
121
|
-
<meta name="google-site-verification" content="{{ site.google_site_verification }}" />
|
|
124
|
+
<meta name="google-site-verification" content="{{ site.google_site_verification | escape_once }}" />
|
|
122
125
|
{% endif %}
|
|
123
126
|
|
|
124
127
|
<script type="application/ld+json">
|
|
125
|
-
{{ seo_tag.json_ld | jsonify }}
|
|
128
|
+
{{ seo_tag.json_ld | jsonify | seo_json_escape }}
|
|
126
129
|
</script>
|
|
127
130
|
|
|
128
131
|
<!-- End Jekyll SEO tag -->
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: jekyll-seo-tag
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.9.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ben Balter
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-09-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: jekyll
|
|
@@ -86,7 +86,7 @@ dependencies:
|
|
|
86
86
|
- - "~>"
|
|
87
87
|
- !ruby/object:Gem::Version
|
|
88
88
|
version: 0.12.0
|
|
89
|
-
description:
|
|
89
|
+
description:
|
|
90
90
|
email:
|
|
91
91
|
- ben.balter@github.com
|
|
92
92
|
executables: []
|
|
@@ -117,6 +117,7 @@ files:
|
|
|
117
117
|
- lib/jekyll-seo-tag/drop.rb
|
|
118
118
|
- lib/jekyll-seo-tag/filters.rb
|
|
119
119
|
- lib/jekyll-seo-tag/image_drop.rb
|
|
120
|
+
- lib/jekyll-seo-tag/json_filters.rb
|
|
120
121
|
- lib/jekyll-seo-tag/json_ld.rb
|
|
121
122
|
- lib/jekyll-seo-tag/json_ld_drop.rb
|
|
122
123
|
- lib/jekyll-seo-tag/url_helper.rb
|
|
@@ -131,7 +132,7 @@ licenses:
|
|
|
131
132
|
- MIT
|
|
132
133
|
metadata:
|
|
133
134
|
allowed_push_host: https://rubygems.org
|
|
134
|
-
post_install_message:
|
|
135
|
+
post_install_message:
|
|
135
136
|
rdoc_options: []
|
|
136
137
|
require_paths:
|
|
137
138
|
- lib
|
|
@@ -147,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
147
148
|
version: '0'
|
|
148
149
|
requirements: []
|
|
149
150
|
rubygems_version: 3.1.6
|
|
150
|
-
signing_key:
|
|
151
|
+
signing_key:
|
|
151
152
|
specification_version: 4
|
|
152
153
|
summary: A Jekyll plugin to add metadata tags for search engines and social networks
|
|
153
154
|
to better index and display your site's content.
|