jekyll-seo-tag 2.6.0 → 2.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +103 -0
- data/.github/workflows/release.yml +33 -0
- data/.github/workflows/scripts/memprof +4 -0
- data/.github/workflows/scripts/memprof.rb +14 -0
- data/.github/workflows/third-party.yml +62 -0
- data/.gitignore +8 -11
- data/.rubocop.yml +27 -2
- data/.rubocop_todo.yml +46 -0
- data/Gemfile +2 -1
- data/History.markdown +68 -2
- data/docs/README.md +2 -2
- data/docs/advanced-usage.md +34 -6
- data/docs/usage.md +32 -24
- data/jekyll-seo-tag.gemspec +5 -7
- data/lib/jekyll-seo-tag/author_drop.rb +10 -8
- data/lib/jekyll-seo-tag/drop.rb +22 -12
- data/lib/jekyll-seo-tag/image_drop.rb +13 -9
- data/lib/jekyll-seo-tag/json_ld_drop.rb +25 -9
- data/lib/jekyll-seo-tag/url_helper.rb +2 -2
- data/lib/jekyll-seo-tag/version.rb +1 -1
- data/lib/jekyll-seo-tag.rb +5 -6
- data/lib/template.html +26 -10
- metadata +23 -12
- data/.travis.yml +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 723360f5c41c7258a7c5cf7d19b6d734c43333fc5da1373b04b22ee0859db6ab
|
4
|
+
data.tar.gz: 0f11d746f2167c2b54db8f041210e2a6c009be35f6f8e895203f01f039bc8915
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ddcb4f1218b44ce1cf0215c3cf7a53cc2f7948252cd6be37f8602a3cd98186d63387fc65f52a469277efbab201b0d342894f8bb158ca7c6d0c313548b762c3f7
|
7
|
+
data.tar.gz: bd14fd0aa9f5693f0218b1323f66dec42e8f7a0074507a7d67799abad54125492ffc6a970700c948d1a3d277e5be49940a407f41113fe9a402cffc2e481299ef
|
@@ -0,0 +1,103 @@
|
|
1
|
+
name: Continuous Integration
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- master
|
7
|
+
pull_request:
|
8
|
+
branches:
|
9
|
+
- master
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
j4:
|
13
|
+
if: "!contains(github.event.commits[0].message, '[ci skip]')"
|
14
|
+
name: "Jekyll ${{ matrix.jekyll_version }} (Ruby ${{ matrix.ruby_version }})"
|
15
|
+
runs-on: 'ubuntu-latest'
|
16
|
+
env:
|
17
|
+
JEKYLL_VERSION: ${{ matrix.jekyll_version }}
|
18
|
+
strategy:
|
19
|
+
fail-fast: false
|
20
|
+
matrix:
|
21
|
+
ruby_version:
|
22
|
+
- 2.5
|
23
|
+
- 2.7
|
24
|
+
- 3.0
|
25
|
+
jekyll_version:
|
26
|
+
- "~> 4.0"
|
27
|
+
steps:
|
28
|
+
- uses: actions/checkout@v2
|
29
|
+
with:
|
30
|
+
fetch-depth: 5
|
31
|
+
- name: "Set up Ruby ${{ matrix.ruby_version }}"
|
32
|
+
uses: ruby/setup-ruby@v1
|
33
|
+
with:
|
34
|
+
ruby-version: ${{ matrix.ruby_version }}
|
35
|
+
bundler-cache: true
|
36
|
+
- name: Execute tests
|
37
|
+
run: bundle exec rspec
|
38
|
+
j3:
|
39
|
+
if: "!contains(github.event.commits[0].message, '[ci skip]')"
|
40
|
+
name: "Jekyll ${{ matrix.jekyll_version }} (Ruby ${{ matrix.ruby_version }})"
|
41
|
+
runs-on: 'ubuntu-latest'
|
42
|
+
env:
|
43
|
+
JEKYLL_VERSION: ${{ matrix.jekyll_version }}
|
44
|
+
strategy:
|
45
|
+
fail-fast: false
|
46
|
+
matrix:
|
47
|
+
ruby_version:
|
48
|
+
- 2.5
|
49
|
+
jekyll_version:
|
50
|
+
- "~> 3.9"
|
51
|
+
steps:
|
52
|
+
- uses: actions/checkout@v2
|
53
|
+
with:
|
54
|
+
fetch-depth: 5
|
55
|
+
- name: "Set up Ruby ${{ matrix.ruby_version }}"
|
56
|
+
uses: ruby/setup-ruby@v1
|
57
|
+
with:
|
58
|
+
ruby-version: ${{ matrix.ruby_version }}
|
59
|
+
bundler-cache: true
|
60
|
+
- name: Execute tests
|
61
|
+
run: bundle exec rspec
|
62
|
+
|
63
|
+
style_check:
|
64
|
+
if: "!contains(github.event.commits[0].message, '[ci skip]')"
|
65
|
+
name: "Code Style Check (Ruby ${{ matrix.ruby_version }})"
|
66
|
+
runs-on: 'ubuntu-latest'
|
67
|
+
strategy:
|
68
|
+
fail-fast: false
|
69
|
+
matrix:
|
70
|
+
ruby_version:
|
71
|
+
- 2.5
|
72
|
+
steps:
|
73
|
+
- uses: actions/checkout@v2
|
74
|
+
with:
|
75
|
+
fetch-depth: 5
|
76
|
+
- name: "Set up Ruby ${{ matrix.ruby_version }}"
|
77
|
+
uses: ruby/setup-ruby@v1
|
78
|
+
with:
|
79
|
+
ruby-version: ${{ matrix.ruby_version }}
|
80
|
+
bundler-cache: true
|
81
|
+
- name: Check Style Offenses
|
82
|
+
run: bundle exec rubocop -S -D
|
83
|
+
|
84
|
+
gem_build:
|
85
|
+
if: "!contains(github.event.commits[0].message, '[ci skip]')"
|
86
|
+
name: "Test Gem build (Ruby ${{ matrix.ruby_version }})"
|
87
|
+
runs-on: 'ubuntu-latest'
|
88
|
+
strategy:
|
89
|
+
fail-fast: false
|
90
|
+
matrix:
|
91
|
+
ruby_version:
|
92
|
+
- 2.5
|
93
|
+
steps:
|
94
|
+
- uses: actions/checkout@v2
|
95
|
+
with:
|
96
|
+
fetch-depth: 5
|
97
|
+
- name: "Set up Ruby ${{ matrix.ruby_version }}"
|
98
|
+
uses: ruby/setup-ruby@v1
|
99
|
+
with:
|
100
|
+
ruby-version: ${{ matrix.ruby_version }}
|
101
|
+
bundler-cache: true
|
102
|
+
- name: Test Gem build
|
103
|
+
run: bundle exec gem build jekyll-seo-tag.gemspec
|
@@ -0,0 +1,33 @@
|
|
1
|
+
name: Release Gem
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- master
|
7
|
+
paths:
|
8
|
+
- "lib/**/version.rb"
|
9
|
+
|
10
|
+
jobs:
|
11
|
+
release:
|
12
|
+
if: "github.repository_owner == 'jekyll'"
|
13
|
+
name: "Release Gem (Ruby ${{ matrix.ruby_version }})"
|
14
|
+
runs-on: "ubuntu-latest"
|
15
|
+
strategy:
|
16
|
+
fail-fast: true
|
17
|
+
matrix:
|
18
|
+
ruby_version:
|
19
|
+
- 2.7
|
20
|
+
steps:
|
21
|
+
- name: Checkout Repository
|
22
|
+
uses: actions/checkout@v2
|
23
|
+
- name: "Set up Ruby ${{ matrix.ruby_version }}"
|
24
|
+
uses: ruby/setup-ruby@v1
|
25
|
+
with:
|
26
|
+
ruby-version: ${{ matrix.ruby_version }}
|
27
|
+
bundler-cache: true
|
28
|
+
- name: Build and Publish Gem
|
29
|
+
uses: ashmaroli/release-gem@dist
|
30
|
+
with:
|
31
|
+
gemspec_name: jekyll-seo-tag
|
32
|
+
env:
|
33
|
+
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_GEM_PUSH_API_KEY }}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'jekyll'
|
4
|
+
require 'memory_profiler'
|
5
|
+
|
6
|
+
MemoryProfiler.report(allow_files: 'lib/jekyll-seo-tag') do
|
7
|
+
Jekyll::PluginManager.require_from_bundler
|
8
|
+
Jekyll::Commands::Build.process({
|
9
|
+
"source" => File.expand_path(ARGV[0]),
|
10
|
+
"destination" => File.expand_path("#{ARGV[0]}/_site"),
|
11
|
+
"disable_disk_cache" => true,
|
12
|
+
})
|
13
|
+
puts ''
|
14
|
+
end.pretty_print(scale_bytes: true, normalize_paths: true)
|
@@ -0,0 +1,62 @@
|
|
1
|
+
name: Third-Party Repository Profiling
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- master
|
7
|
+
pull_request:
|
8
|
+
branches:
|
9
|
+
- master
|
10
|
+
jobs:
|
11
|
+
build_n_profile:
|
12
|
+
name: "Third-Party Repo Profile (Jekyll ${{ matrix.jekyll_version }}, Ruby ${{ matrix.ruby_version }})"
|
13
|
+
runs-on: "ubuntu-latest"
|
14
|
+
strategy:
|
15
|
+
fail-fast: false
|
16
|
+
matrix:
|
17
|
+
ruby_version:
|
18
|
+
- 2.7
|
19
|
+
jekyll_version:
|
20
|
+
- "~> 4.0"
|
21
|
+
- "~> 3.9"
|
22
|
+
env:
|
23
|
+
BUNDLE_GEMFILE: "sandbox/Gemfile"
|
24
|
+
BUNDLE_PATH: "vendor/bundle"
|
25
|
+
BUNDLE_JOBS: 4
|
26
|
+
BUNDLE_RETRY: 3
|
27
|
+
JEKYLL_VERSION: ${{ matrix.jekyll_version }}
|
28
|
+
steps:
|
29
|
+
- name: Checkout Jekyll SEO Tag
|
30
|
+
uses: actions/checkout@v2
|
31
|
+
with:
|
32
|
+
fetch-depth: 5
|
33
|
+
path: jekyll-seo-tag
|
34
|
+
- name: Checkout Third-Party Repository (WITHOUT SEO Tag)
|
35
|
+
uses: actions/checkout@v2
|
36
|
+
with:
|
37
|
+
repository: ashmaroli/tomjoht.github.io
|
38
|
+
ref: "no-seo-tag"
|
39
|
+
path: alpha-sandbox
|
40
|
+
- name: Checkout Same Third-Party Repository (WITH SEO Tag)
|
41
|
+
uses: actions/checkout@v2
|
42
|
+
with:
|
43
|
+
repository: ashmaroli/tomjoht.github.io
|
44
|
+
ref: "seo-tag"
|
45
|
+
path: sandbox
|
46
|
+
- name: "Set up Ruby ${{ matrix.ruby_version }}"
|
47
|
+
uses: ruby/setup-ruby@v1
|
48
|
+
with:
|
49
|
+
ruby-version: ${{ matrix.ruby_version }}
|
50
|
+
bundler-cache: true
|
51
|
+
- name: Run Jekyll Build (WITHOUT SEO Tag) 3 times
|
52
|
+
run: |
|
53
|
+
bundle exec jekyll build -s alpha-sandbox -d alpha-sandbox/_site --trace
|
54
|
+
bundle exec jekyll build -s alpha-sandbox -d alpha-sandbox/_site --trace
|
55
|
+
bundle exec jekyll build -s alpha-sandbox -d alpha-sandbox/_site --trace
|
56
|
+
- name: Run Jekyll Build (WITH SEO Tag) 3 times
|
57
|
+
run: |
|
58
|
+
bundle exec jekyll build -s sandbox -d sandbox/_site --trace
|
59
|
+
bundle exec jekyll build -s sandbox -d sandbox/_site --trace
|
60
|
+
bundle exec jekyll build -s sandbox -d sandbox/_site --trace
|
61
|
+
- name: Memory Analysis of Jekyll Build (WITH SEO Tag)
|
62
|
+
run: bash jekyll-seo-tag/.github/workflows/scripts/memprof
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -1,17 +1,42 @@
|
|
1
|
+
inherit_from: .rubocop_todo.yml
|
2
|
+
|
1
3
|
require: rubocop-jekyll
|
2
4
|
inherit_gem:
|
3
5
|
rubocop-jekyll: .rubocop.yml
|
4
6
|
|
5
7
|
AllCops:
|
6
|
-
TargetRubyVersion: 2.
|
8
|
+
TargetRubyVersion: 2.5
|
9
|
+
SuggestExtensions: false
|
7
10
|
Exclude:
|
8
11
|
- vendor/**/*
|
9
12
|
|
10
|
-
|
13
|
+
Layout/LineEndStringConcatenationIndentation:
|
14
|
+
Enabled: true
|
15
|
+
Layout/LineLength:
|
11
16
|
Exclude:
|
12
17
|
- spec/**/*
|
13
18
|
- jekyll-seo-tag.gemspec
|
14
19
|
|
20
|
+
Lint/EmptyInPattern:
|
21
|
+
Enabled: false
|
22
|
+
|
15
23
|
Metrics/BlockLength:
|
16
24
|
Exclude:
|
17
25
|
- spec/**/*
|
26
|
+
|
27
|
+
Naming/InclusiveLanguage:
|
28
|
+
Enabled: false
|
29
|
+
|
30
|
+
Performance/MapCompact:
|
31
|
+
Enabled: true
|
32
|
+
Performance/RedundantEqualityComparisonBlock:
|
33
|
+
Enabled: true
|
34
|
+
Performance/RedundantSplitRegexpArgument:
|
35
|
+
Enabled: true
|
36
|
+
|
37
|
+
Style/InPatternThen:
|
38
|
+
Enabled: false
|
39
|
+
Style/MultilineInPatternThen:
|
40
|
+
Enabled: false
|
41
|
+
Style/QuotedSymbols:
|
42
|
+
Enabled: true
|
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
# This configuration was generated by
|
2
|
+
# `rubocop --auto-gen-config --auto-gen-only-exclude`
|
3
|
+
# on 2021-09-17 06:40:32 UTC using RuboCop version 1.18.4.
|
4
|
+
# The point is for the user to remove these configuration records
|
5
|
+
# one by one as the offenses are removed from the code base.
|
6
|
+
# Note that changes in the inspected code, or installation of new
|
7
|
+
# versions of RuboCop, may require this file to be generated again.
|
8
|
+
|
9
|
+
# Offense count: 1
|
10
|
+
# Configuration parameters: AllowComments.
|
11
|
+
Lint/EmptyClass:
|
12
|
+
Exclude:
|
13
|
+
- 'lib/jekyll-seo-tag/version.rb'
|
14
|
+
|
15
|
+
# Offense count: 3
|
16
|
+
Lint/NoReturnInBeginEndBlocks:
|
17
|
+
Exclude:
|
18
|
+
- 'lib/jekyll-seo-tag/author_drop.rb'
|
19
|
+
- 'lib/jekyll-seo-tag/drop.rb'
|
20
|
+
|
21
|
+
# Offense count: 1
|
22
|
+
# Cop supports --auto-correct.
|
23
|
+
Lint/ToJSON:
|
24
|
+
Exclude:
|
25
|
+
- 'lib/jekyll-seo-tag/json_ld_drop.rb'
|
26
|
+
|
27
|
+
# Offense count: 1
|
28
|
+
# Configuration parameters: IgnoredMethods, Max.
|
29
|
+
Metrics/PerceivedComplexity:
|
30
|
+
Exclude:
|
31
|
+
- 'lib/jekyll-seo-tag/drop.rb'
|
32
|
+
|
33
|
+
# Offense count: 1
|
34
|
+
# Configuration parameters: MinSize.
|
35
|
+
Performance/CollectionLiteralInLoop:
|
36
|
+
Exclude:
|
37
|
+
- 'spec/jekyll_seo_tag/author_drop_spec.rb'
|
38
|
+
|
39
|
+
# Offense count: 9
|
40
|
+
# Cop supports --auto-correct.
|
41
|
+
Style/RedundantBegin:
|
42
|
+
Exclude:
|
43
|
+
- 'lib/jekyll-seo-tag.rb'
|
44
|
+
- 'lib/jekyll-seo-tag/author_drop.rb'
|
45
|
+
- 'lib/jekyll-seo-tag/drop.rb'
|
46
|
+
- 'lib/jekyll-seo-tag/image_drop.rb'
|
data/Gemfile
CHANGED
data/History.markdown
CHANGED
@@ -1,8 +1,74 @@
|
|
1
|
-
##
|
1
|
+
## 2.8.0 / 2022-02-04
|
2
2
|
|
3
3
|
### Minor Enhancements
|
4
4
|
|
5
|
-
*
|
5
|
+
* Allow to set type for author (#427)
|
6
|
+
* Allow setting `author.url` (#453)
|
7
|
+
* Implement Facebook domain verification (#455)
|
8
|
+
* Add `og:image:alt` and `twitter:image:alt` (#438)
|
9
|
+
* Sort JSON-LD data by key (#458)
|
10
|
+
|
11
|
+
### Bug Fixes
|
12
|
+
|
13
|
+
* Set the default `og:type` to 'website' (#391)
|
14
|
+
* Template: Remove double new line (#454)
|
15
|
+
|
16
|
+
### Development Fixes
|
17
|
+
|
18
|
+
* Fix typo in source code comment (#449)
|
19
|
+
* Set up Continuous Integration via GH Actions (#450)
|
20
|
+
* Bump RuboCop to v1.18.x (#452)
|
21
|
+
* Add workflow to release gem via GH Actions
|
22
|
+
|
23
|
+
## 2.7.1 / 2020-10-18
|
24
|
+
|
25
|
+
### Development Fixes
|
26
|
+
|
27
|
+
* refactor: mutate site payload instead of duplicating it (#419)
|
28
|
+
|
29
|
+
## 2.7.0 / 2020-10-18
|
30
|
+
|
31
|
+
### Minor Enhancements
|
32
|
+
|
33
|
+
* Change pagination message with `seo_paginator_message` option (#324)
|
34
|
+
* Make Twitter Summary Card without having Twitter account (#284)
|
35
|
+
* Prefer site.tagline to site.description for page title (#356)
|
36
|
+
* Render og:locale meta only when defined explicitly (#388)
|
37
|
+
|
38
|
+
### Bug Fixes
|
39
|
+
|
40
|
+
* Ensure a single leading `@` for twitter usernames (#367)
|
41
|
+
|
42
|
+
### Development Fixes
|
43
|
+
|
44
|
+
* chore(deps): require Ruby > 2.4.0 EOL
|
45
|
+
* test: fix locale specs that use the fallback locale (#360)
|
46
|
+
* refactor: Replace read-only empty hash with private constant (#418)
|
47
|
+
* refactor: Mutate hash literals instead of duplicating them (#417)
|
48
|
+
* refactor: Reduce allocations of instance-agnostic objects (#376)
|
49
|
+
* refactor: Memoize #author_hash in SeoTag::AuthorDrop (#342)
|
50
|
+
* refactor: simplify conditional in SeoTag::Drop#date_modified (#343)
|
51
|
+
* chore(ci): profile seo-tag plugin on a third-party repository (#414)
|
52
|
+
* chore(ci): Jekyll v4.0 (#372)
|
53
|
+
* chore(ci): test against current stable Ruby 2.5 and 2.7 (#385)
|
54
|
+
* style: align with latest jekyll-rubocop (#382)
|
55
|
+
* fix: Travis builds for Jekyll 3.x (#415)
|
56
|
+
|
57
|
+
### Documentation
|
58
|
+
|
59
|
+
* Structured Data Testing Tool is deprecated (#409)
|
60
|
+
* Rename Google webmaster tools to Google Search Console (#403)
|
61
|
+
* Improve documentation on plugin usage (#399)
|
62
|
+
* remove Google+ from example snippet (#358)
|
63
|
+
* HTTPS link to https://ogp.me/ (#359)
|
64
|
+
* HTTPS links to schema.org (#350)
|
65
|
+
* use example.com for example URL (#351)
|
66
|
+
|
67
|
+
## 2.6.1 / 2019-05-17
|
68
|
+
|
69
|
+
### Development Fixes
|
70
|
+
|
71
|
+
* Test against Jekyll 4.x (#336)
|
6
72
|
|
7
73
|
## 2.6.0 / 2019-03-16
|
8
74
|
|
data/docs/README.md
CHANGED
@@ -12,8 +12,8 @@ Jekyll SEO Tag adds the following meta tags to your site:
|
|
12
12
|
* Page description
|
13
13
|
* Canonical URL
|
14
14
|
* Next and previous URLs on paginated pages
|
15
|
-
* [JSON-LD Site and post metadata](https://developers.google.com/structured-data
|
16
|
-
* [Open Graph](
|
15
|
+
* [JSON-LD Site and post metadata](https://developers.google.com/search/docs/guides/intro-structured-data) for richer indexing
|
16
|
+
* [Open Graph](https://ogp.me/) title, description, site title, and URL (for Facebook, LinkedIn, etc.)
|
17
17
|
* [Twitter Summary Card](https://dev.twitter.com/cards/overview) metadata
|
18
18
|
|
19
19
|
While you could theoretically add the necessary metadata tags yourself, Jekyll SEO Tag provides a battle-tested template of crowdsourced best-practices.
|
data/docs/advanced-usage.md
CHANGED
@@ -68,13 +68,25 @@ There are several ways to convey this author-specific information. Author inform
|
|
68
68
|
author: benbalter
|
69
69
|
```
|
70
70
|
|
71
|
+
#### Setting author url
|
72
|
+
|
73
|
+
Starting from August 6, 2021 [Google recommends](https://developers.google.com/search/updates) to set the `author.url` property. This property helps Google to disambiguate the correct author of the article.
|
74
|
+
|
75
|
+
You can set it the same way as the other author properties. For example, you can put it in an `author` object, in the site's `_config.yml`, e.g.:
|
76
|
+
|
77
|
+
```yml
|
78
|
+
author:
|
79
|
+
name: My Name
|
80
|
+
url: https://example.com/
|
81
|
+
```
|
82
|
+
|
71
83
|
### Customizing JSON-LD output
|
72
84
|
|
73
85
|
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.
|
74
86
|
|
75
87
|
* `seo`
|
76
88
|
* `name` - If the name of the thing that the page represents is different from the page title. (i.e.: "Frank's Café" vs "Welcome to Frank's Café")
|
77
|
-
* `type` - The type of things that the page represents. This must be a [Schema.org type](
|
89
|
+
* `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.
|
78
90
|
* `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.
|
79
91
|
* `date_modified` - Manually specify the `dateModified` field in the JSON-LD output to override Jekyll's own `dateModified`.
|
80
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.
|
@@ -86,6 +98,7 @@ For most users, setting `image: [path-to-image]` on a per-page basis should be e
|
|
86
98
|
* `path` - The relative path to the image. Same as `image: [path-to-image]`
|
87
99
|
* `height` - The height of the Open Graph (`og:image`) image
|
88
100
|
* `width` - The width of the Open Graph (`og:image`) image
|
101
|
+
* `alt` - The alternative image text for Open Graph (`og:image:alt`) and Twitter (`twitter:image:alt`)
|
89
102
|
|
90
103
|
You can use any of the above, optional properties, like so:
|
91
104
|
|
@@ -94,11 +107,12 @@ image:
|
|
94
107
|
path: /img/twitter.png
|
95
108
|
height: 100
|
96
109
|
width: 100
|
110
|
+
alt: Twitter Logo
|
97
111
|
```
|
98
112
|
|
99
113
|
### Setting a default image
|
100
114
|
|
101
|
-
You can define a default image using [Front Matter
|
115
|
+
You can define a default image using [Front Matter defaults](https://jekyllrb.com/docs/configuration/front-matter-defaults/), to provide a default Twitter Card or OGP image to all of your posts and pages.
|
102
116
|
|
103
117
|
Here is a very basic example, that you are encouraged to adapt to your needs:
|
104
118
|
|
@@ -112,11 +126,11 @@ defaults:
|
|
112
126
|
|
113
127
|
### SmartyPants Titles
|
114
128
|
|
115
|
-
Titles will be processed using [Jekyll's `smartify` filter](https://jekyllrb.com/docs/
|
129
|
+
Titles will be processed using [Jekyll's `smartify` filter](https://jekyllrb.com/docs/liquid/filters/). This will use SmartyPants to translate plain ASCII punctuation into "smart" typographic punctuation. This will not render or strip any Markdown you may be using in a page title.
|
116
130
|
|
117
131
|
### Setting customized Canonical URL
|
118
132
|
|
119
|
-
You can set custom Canonical URL for a page by specifying canonical_url option in page front
|
133
|
+
You can set custom Canonical URL for a page by specifying canonical_url option in page front matter.
|
120
134
|
E.g., you have the following in the page's front matter:
|
121
135
|
```yml
|
122
136
|
layout: post
|
@@ -130,7 +144,7 @@ Which will generate canonical_url with specified link in canonical_url.
|
|
130
144
|
```
|
131
145
|
|
132
146
|
If no canonical_url option was specified, then uses page url for generating canonical_url.
|
133
|
-
E.g., you have not specified canonical_url in front
|
147
|
+
E.g., you have not specified canonical_url in front matter:
|
134
148
|
```yml
|
135
149
|
layout: post
|
136
150
|
title: Title of Your Post
|
@@ -138,5 +152,19 @@ title: Title of Your Post
|
|
138
152
|
|
139
153
|
Which will generate following canonical_url:
|
140
154
|
```html
|
141
|
-
<link rel="canonical" href="
|
155
|
+
<link rel="canonical" href="https://example.com/title-of-your-post" />
|
142
156
|
```
|
157
|
+
|
158
|
+
### Customizing title modifier for paginated pages
|
159
|
+
|
160
|
+
You can override the default title modifier for paginated pages from `Page %{current} of %{total} for ` to a string of your
|
161
|
+
choice by setting a `seo_paginator_message` key in your `_config.yml`.
|
162
|
+
|
163
|
+
For example:
|
164
|
+
|
165
|
+
```yml
|
166
|
+
seo_paginator_message: "%<current>s / %<total>s | "
|
167
|
+
```
|
168
|
+
|
169
|
+
While the value can be any string text, we recommend using a Ruby string-template containing the variables `current` and `total`
|
170
|
+
similar to the example above, to incorporate the current page-number and total number of paginated pages in the title.
|
data/docs/usage.md
CHANGED
@@ -1,22 +1,29 @@
|
|
1
1
|
## Usage
|
2
2
|
|
3
|
-
The SEO tag will respect any of the following if included in your site's `_config.yml` (and simply not include them if
|
3
|
+
The SEO tag will respect any of the following if included in your site's `_config.yml` (and simply not include them if
|
4
|
+
they're not defined):
|
4
5
|
|
5
|
-
* `title` - Your site's title (e.g., Ben's
|
6
|
-
|
6
|
+
* `title` - Your site's title (e.g., *Ben's Awesome Site*, *The GitHub Blog*, etc.), used as part of the title tag like
|
7
|
+
`Home | Ben's Awesome Site`.
|
8
|
+
* `tagline` - A short description (e.g., *A blog dedicated to reviewing cat gifs*), used as part of the title tag like
|
9
|
+
`Ben's Awesome Site | A blog dedicated to reviewing cat gifs` instead of `Ben's Awesome Site | Long description about a
|
10
|
+
blog dedicated to reviewing cat gifs` that would be used when `page.title` is not defined.
|
11
|
+
* `description` - A longer description used for the description meta tag. Also used as fallback for pages that don't
|
12
|
+
provide their own `description`, and also as part of the page's title tag if neither `page.title` nor `site.tagline`
|
13
|
+
has been defined.
|
7
14
|
* `url` - The full URL to your site. Note: `site.github.url` will be used by default.
|
8
15
|
* `author` - global author information (see [Advanced usage](advanced-usage.md#author-information))
|
9
|
-
|
10
16
|
* `twitter` - The following properties are available:
|
11
17
|
* `twitter:card` - The site's default card type
|
12
|
-
* `twitter:username` - The site's Twitter handle.
|
18
|
+
* `twitter:username` - The site's Twitter handle.
|
19
|
+
|
20
|
+
You'll want to describe them like so:
|
13
21
|
|
14
22
|
```yml
|
15
23
|
twitter:
|
16
24
|
username: benbalter
|
17
25
|
card: summary
|
18
26
|
```
|
19
|
-
|
20
27
|
* `facebook` - The following properties are available:
|
21
28
|
* `facebook:app_id` - a Facebook app ID for Facebook insights
|
22
29
|
* `facebook:publisher` - a Facebook page URL or ID of the publishing entity
|
@@ -30,9 +37,12 @@ The SEO tag will respect any of the following if included in your site's `_confi
|
|
30
37
|
publisher: 1234
|
31
38
|
admins: 1234
|
32
39
|
```
|
33
|
-
|
34
|
-
|
35
|
-
|
40
|
+
* `logo` - URL to a site-wide logo (e.g., `/assets/your-company-logo.png`) - If you would like the "publisher" property
|
41
|
+
to be present, you must add this field to your site's configuration, during the validation of the structured data by
|
42
|
+
Google Search Console, if the `logo` field is not validated, you will find errors inherent to the publisher in the
|
43
|
+
[Rich Results Testing Tool](https://search.google.com/test/rich-results)
|
44
|
+
* `social` - For [specifying social profiles](https://developers.google.com/search/docs/guides/enhance-site#add-your-sites-name-logo-and-social-links).
|
45
|
+
The following properties are available:
|
36
46
|
* `name` - If the user or organization name differs from the site's name
|
37
47
|
* `links` - An array of links to social media profiles.
|
38
48
|
|
@@ -43,24 +53,22 @@ The SEO tag will respect any of the following if included in your site's `_confi
|
|
43
53
|
- https://twitter.com/BenBalter
|
44
54
|
- https://www.facebook.com/ben.balter
|
45
55
|
- https://www.linkedin.com/in/BenBalter
|
46
|
-
- https://plus.google.com/+BenBalter
|
47
56
|
- https://github.com/benbalter
|
48
57
|
- https://keybase.io/benbalter
|
49
58
|
```
|
50
|
-
|
51
|
-
* `google_site_verification` for verifying ownership via Google webmaster tools
|
59
|
+
* `google_site_verification` for verifying ownership via Google Search Console
|
52
60
|
* Alternatively, verify ownership with several services at once using the following format:
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
```
|
62
|
-
|
63
|
-
|
61
|
+
```yml
|
62
|
+
webmaster_verifications:
|
63
|
+
google: 1234
|
64
|
+
bing: 1234
|
65
|
+
alexa: 1234
|
66
|
+
yandex: 1234
|
67
|
+
baidu: 1234
|
68
|
+
facebook: 1234
|
69
|
+
```
|
70
|
+
* `locale` - The locale these tags are marked up in. Of the format `language_TERRITORY`. Default is `en_US`. Takes priority
|
71
|
+
over existing config key `lang`.
|
64
72
|
|
65
73
|
The SEO tag will respect the following YAML front matter if included in a post, page, or document:
|
66
74
|
|
@@ -68,6 +76,6 @@ The SEO tag will respect the following YAML front matter if included in a post,
|
|
68
76
|
* `description` - A short description of the page's content
|
69
77
|
* `image` - URL to an image associated with the post, page, or document (e.g., `/assets/page-pic.jpg`)
|
70
78
|
* `author` - Page-, post-, or document-specific author information (see [Advanced usage](advanced-usage.md#author-information))
|
71
|
-
* `
|
79
|
+
* `locale` - Page-, post-, or document-specific locale information. Takes priority over existing front matter attribute `lang`.
|
72
80
|
|
73
81
|
*Note:* Front matter defaults can be used for any of the above values as described in advanced usage with an image example.
|
data/jekyll-seo-tag.gemspec
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
4
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
-
require "jekyll-seo-tag/version"
|
3
|
+
require_relative "lib/jekyll-seo-tag/version"
|
6
4
|
|
7
5
|
Gem::Specification.new do |spec|
|
8
6
|
spec.name = "jekyll-seo-tag"
|
@@ -10,7 +8,7 @@ Gem::Specification.new do |spec|
|
|
10
8
|
spec.authors = ["Ben Balter"]
|
11
9
|
spec.email = ["ben.balter@github.com"]
|
12
10
|
spec.summary = "A Jekyll plugin to add metadata tags for search engines and social networks to better index and display your site's content."
|
13
|
-
spec.homepage = "https://github.com/
|
11
|
+
spec.homepage = "https://github.com/jekyll/jekyll-seo-tag"
|
14
12
|
spec.license = "MIT"
|
15
13
|
|
16
14
|
# Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
|
@@ -21,16 +19,16 @@ Gem::Specification.new do |spec|
|
|
21
19
|
raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
|
22
20
|
end
|
23
21
|
|
24
|
-
spec.required_ruby_version = ">= 2.
|
22
|
+
spec.required_ruby_version = ">= 2.5.0"
|
25
23
|
|
26
24
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r!^(test|spec|features)/!) }
|
27
25
|
spec.bindir = "exe"
|
28
26
|
spec.executables = spec.files.grep(%r!^exe/!) { |f| File.basename(f) }
|
29
27
|
spec.require_paths = ["lib"]
|
30
28
|
|
31
|
-
spec.add_dependency "jekyll", "
|
29
|
+
spec.add_dependency "jekyll", ">= 3.8", "< 5.0"
|
32
30
|
spec.add_development_dependency "bundler", ">= 1.15"
|
33
31
|
spec.add_development_dependency "html-proofer", "~> 3.7"
|
34
32
|
spec.add_development_dependency "rspec", "~> 3.5"
|
35
|
-
spec.add_development_dependency "rubocop-jekyll", "~> 0.
|
33
|
+
spec.add_development_dependency "rubocop-jekyll", "~> 0.12.0"
|
36
34
|
end
|
@@ -41,8 +41,7 @@ module Jekyll
|
|
41
41
|
|
42
42
|
private
|
43
43
|
|
44
|
-
attr_reader :page
|
45
|
-
attr_reader :site
|
44
|
+
attr_reader :site, :page
|
46
45
|
|
47
46
|
# Finds the page author in the page.author, page.authors, or site.author
|
48
47
|
#
|
@@ -74,12 +73,15 @@ module Jekyll
|
|
74
73
|
# including site-wide metadata if the author is provided as a string,
|
75
74
|
# or an empty hash, if the author cannot be resolved
|
76
75
|
def author_hash
|
77
|
-
|
78
|
-
resolved_author
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
76
|
+
@author_hash ||= begin
|
77
|
+
case resolved_author
|
78
|
+
when Hash
|
79
|
+
resolved_author
|
80
|
+
when String
|
81
|
+
{ "name" => resolved_author }.merge!(site_data_hash)
|
82
|
+
else
|
83
|
+
{}
|
84
|
+
end
|
83
85
|
end
|
84
86
|
end
|
85
87
|
|
data/lib/jekyll-seo-tag/drop.rb
CHANGED
@@ -11,10 +11,13 @@ module Jekyll
|
|
11
11
|
].freeze
|
12
12
|
HOMEPAGE_OR_ABOUT_REGEX = %r!^/(about/)?(index.html?)?$!.freeze
|
13
13
|
|
14
|
+
EMPTY_READ_ONLY_HASH = {}.freeze
|
15
|
+
private_constant :EMPTY_READ_ONLY_HASH
|
16
|
+
|
14
17
|
def initialize(text, context)
|
15
|
-
@obj =
|
18
|
+
@obj = EMPTY_READ_ONLY_HASH
|
16
19
|
@mutations = {}
|
17
|
-
@text
|
20
|
+
@text = text
|
18
21
|
@context = context
|
19
22
|
end
|
20
23
|
|
@@ -34,6 +37,10 @@ module Jekyll
|
|
34
37
|
@site_title ||= format_string(site["title"] || site["name"])
|
35
38
|
end
|
36
39
|
|
40
|
+
def site_tagline
|
41
|
+
@site_tagline ||= format_string site["tagline"]
|
42
|
+
end
|
43
|
+
|
37
44
|
def site_description
|
38
45
|
@site_description ||= format_string site["description"]
|
39
46
|
end
|
@@ -43,6 +50,10 @@ module Jekyll
|
|
43
50
|
@page_title ||= format_string(page["title"]) || site_title
|
44
51
|
end
|
45
52
|
|
53
|
+
def site_tagline_or_description
|
54
|
+
site_tagline || site_description
|
55
|
+
end
|
56
|
+
|
46
57
|
# Page title with site title or description appended
|
47
58
|
# rubocop:disable Metrics/CyclomaticComplexity
|
48
59
|
def title
|
@@ -50,7 +61,7 @@ module Jekyll
|
|
50
61
|
if site_title && page_title != site_title
|
51
62
|
page_title + TITLE_SEPARATOR + site_title
|
52
63
|
elsif site_description && site_title
|
53
|
-
site_title + TITLE_SEPARATOR +
|
64
|
+
site_title + TITLE_SEPARATOR + site_tagline_or_description
|
54
65
|
else
|
55
66
|
page_title || site_title
|
56
67
|
end
|
@@ -101,13 +112,7 @@ module Jekyll
|
|
101
112
|
|
102
113
|
def date_modified
|
103
114
|
@date_modified ||= begin
|
104
|
-
date =
|
105
|
-
page_seo["date_modified"]
|
106
|
-
elsif page["last_modified_at"]
|
107
|
-
page["last_modified_at"].to_liquid
|
108
|
-
else
|
109
|
-
page["date"]
|
110
|
-
end
|
115
|
+
date = page_seo["date_modified"] || page["last_modified_at"].to_liquid || page["date"]
|
111
116
|
filters.date_to_xmlschema(date) if date
|
112
117
|
end
|
113
118
|
end
|
@@ -156,6 +161,10 @@ module Jekyll
|
|
156
161
|
@page_lang ||= page["lang"] || site["lang"] || "en_US"
|
157
162
|
end
|
158
163
|
|
164
|
+
def page_locale
|
165
|
+
@page_locale ||= (page["locale"] || site["locale"] || page_lang).tr("-", "_")
|
166
|
+
end
|
167
|
+
|
159
168
|
def canonical_url
|
160
169
|
@canonical_url ||= begin
|
161
170
|
if page["canonical_url"].to_s.empty?
|
@@ -189,8 +198,9 @@ module Jekyll
|
|
189
198
|
|
190
199
|
current = @context["paginator"]["page"]
|
191
200
|
total = @context["paginator"]["total_pages"]
|
201
|
+
paginator_message = site["seo_paginator_message"] || "Page %<current>s of %<total>s for "
|
192
202
|
|
193
|
-
|
203
|
+
format(paginator_message, :current => current, :total => total) if current > 1
|
194
204
|
end
|
195
205
|
|
196
206
|
attr_reader :context
|
@@ -229,7 +239,7 @@ module Jekyll
|
|
229
239
|
if hash[key].is_a?(Hash)
|
230
240
|
hash[key]
|
231
241
|
else
|
232
|
-
|
242
|
+
EMPTY_READ_ONLY_HASH
|
233
243
|
end
|
234
244
|
end
|
235
245
|
end
|
@@ -34,18 +34,22 @@ module Jekyll
|
|
34
34
|
|
35
35
|
private
|
36
36
|
|
37
|
-
attr_accessor :page
|
38
|
-
attr_accessor :context
|
37
|
+
attr_accessor :page, :context
|
39
38
|
|
40
39
|
# The normalized image hash with a `path` key (which may be nil)
|
41
40
|
def image_hash
|
42
|
-
@image_hash ||=
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
41
|
+
@image_hash ||= begin
|
42
|
+
image_meta = page["image"]
|
43
|
+
|
44
|
+
case image_meta
|
45
|
+
when Hash
|
46
|
+
{ "path" => nil }.merge!(image_meta)
|
47
|
+
when String
|
48
|
+
{ "path" => image_meta }
|
49
|
+
else
|
50
|
+
{ "path" => nil }
|
51
|
+
end
|
52
|
+
end
|
49
53
|
end
|
50
54
|
alias_method :fallback_data, :image_hash
|
51
55
|
|
@@ -16,9 +16,12 @@ module Jekyll
|
|
16
16
|
def_delegator :page_drop, :type, :type
|
17
17
|
|
18
18
|
# Expose #type and #logo as private methods and #@type as a public method
|
19
|
-
alias_method
|
20
|
-
private :type
|
21
|
-
|
19
|
+
alias_method :@type, :type
|
20
|
+
private :type, :logo
|
21
|
+
|
22
|
+
VALID_ENTITY_TYPES = %w(BlogPosting CreativeWork).freeze
|
23
|
+
VALID_AUTHOR_TYPES = %w(Organization Person).freeze
|
24
|
+
private_constant :VALID_ENTITY_TYPES, :VALID_AUTHOR_TYPES
|
22
25
|
|
23
26
|
# page_drop should be an instance of Jekyll::SeoTag::Drop
|
24
27
|
def initialize(page_drop)
|
@@ -27,7 +30,7 @@ module Jekyll
|
|
27
30
|
end
|
28
31
|
|
29
32
|
def fallback_data
|
30
|
-
{
|
33
|
+
@fallback_data ||= {
|
31
34
|
"@context" => "https://schema.org",
|
32
35
|
}
|
33
36
|
end
|
@@ -35,10 +38,18 @@ module Jekyll
|
|
35
38
|
def author
|
36
39
|
return unless page_drop.author["name"]
|
37
40
|
|
38
|
-
|
39
|
-
|
41
|
+
author_type = page_drop.author["type"]
|
42
|
+
return if author_type && !VALID_AUTHOR_TYPES.include?(author_type)
|
43
|
+
|
44
|
+
hash = {
|
45
|
+
"@type" => author_type || "Person",
|
40
46
|
"name" => page_drop.author["name"],
|
41
47
|
}
|
48
|
+
|
49
|
+
author_url = page_drop.author["url"]
|
50
|
+
hash["url"] = author_url if author_url
|
51
|
+
|
52
|
+
hash
|
42
53
|
end
|
43
54
|
|
44
55
|
def image
|
@@ -66,7 +77,7 @@ module Jekyll
|
|
66
77
|
end
|
67
78
|
|
68
79
|
def main_entity
|
69
|
-
return unless
|
80
|
+
return unless VALID_ENTITY_TYPES.include?(type)
|
70
81
|
|
71
82
|
{
|
72
83
|
"@type" => "WebPage",
|
@@ -76,8 +87,13 @@ module Jekyll
|
|
76
87
|
alias_method :mainEntityOfPage, :main_entity
|
77
88
|
private :main_entity
|
78
89
|
|
79
|
-
|
80
|
-
|
90
|
+
# Returns a JSON-encoded object containing the JSON-LD data.
|
91
|
+
# Keys are sorted.
|
92
|
+
def to_json(state = nil)
|
93
|
+
keys.sort.each_with_object({}) do |(key, _), result|
|
94
|
+
v = self[key]
|
95
|
+
result[key] = v unless v.nil?
|
96
|
+
end.to_json(state)
|
81
97
|
end
|
82
98
|
|
83
99
|
private
|
@@ -8,8 +8,8 @@ module Jekyll
|
|
8
8
|
|
9
9
|
# Determines if the given string is an absolute URL
|
10
10
|
#
|
11
|
-
# Returns true if an absolute URL
|
12
|
-
#
|
11
|
+
# Returns true if an absolute URL
|
12
|
+
# Returns false if it's a relative URL
|
13
13
|
# Returns nil if it is not a string or can't be parsed as a URL
|
14
14
|
def absolute_url?(string)
|
15
15
|
return unless string
|
data/lib/jekyll-seo-tag.rb
CHANGED
@@ -47,12 +47,11 @@ module Jekyll
|
|
47
47
|
|
48
48
|
def payload
|
49
49
|
# site_payload is an instance of UnifiedPayloadDrop. See https://git.io/v5ajm
|
50
|
-
|
51
|
-
context.registers[:
|
52
|
-
"
|
53
|
-
|
54
|
-
|
55
|
-
)
|
50
|
+
context.registers[:site].site_payload.tap do |site_payload|
|
51
|
+
site_payload["page"] = context.registers[:page]
|
52
|
+
site_payload["paginator"] = context["paginator"]
|
53
|
+
site_payload["seo_tag"] = drop
|
54
|
+
end
|
56
55
|
end
|
57
56
|
|
58
57
|
def drop
|
data/lib/template.html
CHANGED
@@ -13,7 +13,7 @@
|
|
13
13
|
<meta name="author" content="{{ seo_tag.author.name }}" />
|
14
14
|
{% endif %}
|
15
15
|
|
16
|
-
<meta property="og:locale" content="{{ seo_tag.
|
16
|
+
<meta property="og:locale" content="{{ seo_tag.page_locale }}" />
|
17
17
|
|
18
18
|
{% if seo_tag.description %}
|
19
19
|
<meta name="description" content="{{ seo_tag.description }}" />
|
@@ -37,11 +37,16 @@
|
|
37
37
|
{% if seo_tag.image.width %}
|
38
38
|
<meta property="og:image:width" content="{{ seo_tag.image.width }}" />
|
39
39
|
{% endif %}
|
40
|
+
{% if seo_tag.image.alt %}
|
41
|
+
<meta property="og:image:alt" content="{{ seo_tag.image.alt }}" />
|
42
|
+
{% endif %}
|
40
43
|
{% endif %}
|
41
44
|
|
42
45
|
{% if page.date %}
|
43
46
|
<meta property="og:type" content="article" />
|
44
47
|
<meta property="article:published_time" content="{{ page.date | date_to_xmlschema }}" />
|
48
|
+
{% else %}
|
49
|
+
<meta property="og:type" content="website" />
|
45
50
|
{% endif %}
|
46
51
|
|
47
52
|
{% if paginator.previous_page %}
|
@@ -51,19 +56,26 @@
|
|
51
56
|
<link rel="next" href="{{ paginator.next_page_path | absolute_url }}" />
|
52
57
|
{% endif %}
|
53
58
|
|
54
|
-
{% if
|
55
|
-
{
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
59
|
+
{% if seo_tag.image %}
|
60
|
+
<meta name="twitter:card" content="{{ page.twitter.card | default: site.twitter.card | default: "summary_large_image" }}" />
|
61
|
+
<meta property="twitter:image" content="{{ seo_tag.image.path }}" />
|
62
|
+
{% else %}
|
63
|
+
<meta name="twitter:card" content="summary" />
|
64
|
+
{% endif %}
|
65
|
+
|
66
|
+
{% if seo_tag.image.alt %}
|
67
|
+
<meta name="twitter:image:alt" content="{{ seo_tag.image.alt }}" />
|
68
|
+
{% endif %}
|
61
69
|
|
70
|
+
{% if seo_tag.page_title %}
|
62
71
|
<meta property="twitter:title" content="{{ seo_tag.page_title }}" />
|
63
|
-
|
72
|
+
{% endif %}
|
73
|
+
|
74
|
+
{% if site.twitter %}
|
75
|
+
<meta name="twitter:site" content="@{{ site.twitter.username | remove:'@' }}" />
|
64
76
|
|
65
77
|
{% if seo_tag.author.twitter %}
|
66
|
-
<meta name="twitter:creator" content="@{{ seo_tag.author.twitter }}" />
|
78
|
+
<meta name="twitter:creator" content="@{{ seo_tag.author.twitter | remove:'@' }}" />
|
67
79
|
{% endif %}
|
68
80
|
{% endif %}
|
69
81
|
|
@@ -101,6 +113,10 @@
|
|
101
113
|
{% if site.webmaster_verifications.baidu %}
|
102
114
|
<meta name="baidu-site-verification" content="{{ site.webmaster_verifications.baidu }}" />
|
103
115
|
{% endif %}
|
116
|
+
|
117
|
+
{% if site.webmaster_verifications.facebook %}
|
118
|
+
<meta name="facebook-domain-verification" content="{{ site.webmaster_verifications.facebook }}" />
|
119
|
+
{% endif %}
|
104
120
|
{% elsif site.google_site_verification %}
|
105
121
|
<meta name="google-site-verification" content="{{ site.google_site_verification }}" />
|
106
122
|
{% endif %}
|
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
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.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Balter
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.8'
|
20
|
+
- - "<"
|
18
21
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
22
|
+
version: '5.0'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '3.8'
|
30
|
+
- - "<"
|
25
31
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
32
|
+
version: '5.0'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: bundler
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -72,14 +78,14 @@ dependencies:
|
|
72
78
|
requirements:
|
73
79
|
- - "~>"
|
74
80
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
81
|
+
version: 0.12.0
|
76
82
|
type: :development
|
77
83
|
prerelease: false
|
78
84
|
version_requirements: !ruby/object:Gem::Requirement
|
79
85
|
requirements:
|
80
86
|
- - "~>"
|
81
87
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
88
|
+
version: 0.12.0
|
83
89
|
description:
|
84
90
|
email:
|
85
91
|
- ben.balter@github.com
|
@@ -87,10 +93,15 @@ executables: []
|
|
87
93
|
extensions: []
|
88
94
|
extra_rdoc_files: []
|
89
95
|
files:
|
96
|
+
- ".github/workflows/ci.yml"
|
97
|
+
- ".github/workflows/release.yml"
|
98
|
+
- ".github/workflows/scripts/memprof"
|
99
|
+
- ".github/workflows/scripts/memprof.rb"
|
100
|
+
- ".github/workflows/third-party.yml"
|
90
101
|
- ".gitignore"
|
91
102
|
- ".rspec"
|
92
103
|
- ".rubocop.yml"
|
93
|
-
- ".
|
104
|
+
- ".rubocop_todo.yml"
|
94
105
|
- Gemfile
|
95
106
|
- History.markdown
|
96
107
|
- LICENSE.txt
|
@@ -115,7 +126,7 @@ files:
|
|
115
126
|
- script/cibuild
|
116
127
|
- script/release
|
117
128
|
- script/site
|
118
|
-
homepage: https://github.com/
|
129
|
+
homepage: https://github.com/jekyll/jekyll-seo-tag
|
119
130
|
licenses:
|
120
131
|
- MIT
|
121
132
|
metadata:
|
@@ -128,14 +139,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
128
139
|
requirements:
|
129
140
|
- - ">="
|
130
141
|
- !ruby/object:Gem::Version
|
131
|
-
version: 2.
|
142
|
+
version: 2.5.0
|
132
143
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
133
144
|
requirements:
|
134
145
|
- - ">="
|
135
146
|
- !ruby/object:Gem::Version
|
136
147
|
version: '0'
|
137
148
|
requirements: []
|
138
|
-
rubygems_version: 3.
|
149
|
+
rubygems_version: 3.1.6
|
139
150
|
signing_key:
|
140
151
|
specification_version: 4
|
141
152
|
summary: A Jekyll plugin to add metadata tags for search engines and social networks
|