Merge branch 'master' into add-custom-paginator-message

This commit is contained in:
Frank Taillandier 2019-10-03 18:49:45 +02:00 committed by GitHub
commit 6bb46cc6d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 73 additions and 21 deletions

View File

@ -1,3 +1,5 @@
inherit_from: .rubocop_todo.yml
require: rubocop-jekyll
inherit_gem:
rubocop-jekyll: .rubocop.yml

13
.rubocop_todo.yml Normal file
View File

@ -0,0 +1,13 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2019-03-25 11:42:06 +0100 using RuboCop version 0.66.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.
# Offense count: 1
# Cop supports --auto-correct.
Lint/ToJSON:
Exclude:
- 'lib/jekyll-seo-tag/json_ld_drop.rb'

View File

@ -1,13 +1,18 @@
rvm:
- 2.3
- 2.4
- 2.5
before_install: gem install bundler
language: ruby
script: script/cibuild
sudo: false
cache: bundler
rvm:
- 2.4
- 2.6
before_install:
- gem update --system
- gem install bundler
script: script/cibuild
env:
global:
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true
matrix:
- JEKYLL_VERSION="~> 3.3"
- JEKYLL_VERSION=">= 4.0.0.pre.alpha1"

View File

@ -4,4 +4,4 @@ source "https://rubygems.org"
gemspec
gem "github-pages", :group => :jekyll_plugins
gem "jekyll", ENV["JEKYLL_VERSION"] if ENV["JEKYLL_VERSION"]

View File

@ -1,16 +1,42 @@
## HEAD
### Documentation
* HTTPS links to schema.org (#350)
* use example.com for example URL (#351)
* remove Google+ from example snippet (#358)
* HTTPS link to https://ogp.me/ (#359)
## 2.6.1 / 2019-05-17
### Development Fixes
* Test against Jekyll 4.x (#336)
## 2.6.0 / 2019-03-16
### Minor Enhancements
* Twitter Image and Title (#330)
### Bug Fixes
* Do not cache the drop payload for SeoTag (#306)
* Update url of schema website (#296)
### Development Fixes
* Lint Ruby code with rubocop-jekyll gem (#302)
* deps: bump rubocop-jekyll to 0.3.0 (#316)
* Correct RuboCop offenses in spec files (#319)
* chore(deps): :up: rubocop-jekyll 0.4 (#320)
* Relax version constraint on Bundler (#325)
* chore(ci): Add Ruby 2.6, drop Ruby 2.3 (#326)
* chore (ci): remove deprecated `sudo: false` in .travis.yml (#333)
* Lint Ruby code with rubocop-jekyll gem (#302)
* chore(deps): bump rubocop-jekyll to v0.4 (#320)
* chore(deps): bump rubocop-jekyll to v0.3 (#316)
* Correct RuboCop offenses in spec files (#319)
### Documentation
* Rectify error in Usage documentation (#328)
## 2.5.0 / 2018-05-18

View File

@ -12,8 +12,8 @@ Jekyll SEO Tag adds the following meta tags to your site:
* Page description
* Canonical URL
* Next and previous URLs on paginated pages
* [JSON-LD Site and post metadata](https://developers.google.com/structured-data/) for richer indexing
* [Open Graph](http://ogp.me/) title, description, site title, and URL (for Facebook, LinkedIn, etc.)
* [JSON-LD Site and post metadata](https://developers.google.com/search/docs/guides/intro-structured-data) for richer indexing
* [Open Graph](https://ogp.me/) title, description, site title, and URL (for Facebook, LinkedIn, etc.)
* [Twitter Summary Card](https://dev.twitter.com/cards/overview) metadata
While you could theoretically add the necessary metadata tags yourself, Jekyll SEO Tag provides a battle-tested template of crowdsourced best-practices.

View File

@ -74,8 +74,10 @@ The following options can be set for any particular page. While the default opti
* `seo`
* `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é")
* `type` - The type of things that the page represents. This must be a [Schema.org type](http://schema.org/docs/schemas.html), and will probably usually be something like [`BlogPosting`](http://schema.org/BlogPosting), [`NewsArticle`](http://schema.org/NewsArticle), [`Person`](http://schema.org/Person), [`Organization`](http://schema.org/Organization), etc.
* `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.
* `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.
* `date_modified` - Manually specify the `dateModified` field in the JSON-LD output to override Jekyll's own `dateModified`.
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.
### Customizing image output
@ -136,7 +138,7 @@ title: Title of Your Post
Which will generate following canonical_url:
```html
<link rel="canonical" href="http://yoursite.com/title-of-your-post" />
<link rel="canonical" href="https://example.com/title-of-your-post" />
```
### Customizing title modifier for paginated pages

View File

@ -35,7 +35,6 @@ The SEO tag will respect any of the following if included in your site's `_confi
* `social` - For [specifying social profiles](https://developers.google.com/structured-data/customize/social-profiles). The following properties are available:
* `name` - If the user or organization name differs from the site's name
* `links` - An array of links to social media profiles.
* `date_modified` - Manually specify the `dateModified` field in the JSON-LD output to override Jekyll's own `dateModified`. 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.
```yml
social:
@ -44,7 +43,6 @@ The SEO tag will respect any of the following if included in your site's `_confi
- https://twitter.com/BenBalter
- https://www.facebook.com/ben.balter
- https://www.linkedin.com/in/BenBalter
- https://plus.google.com/+BenBalter
- https://github.com/benbalter
- https://keybase.io/benbalter
```

View File

@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
spec.executables = spec.files.grep(%r!^exe/!) { |f| File.basename(f) }
spec.require_paths = ["lib"]
spec.add_dependency "jekyll", "~> 3.3"
spec.add_dependency "jekyll", ">= 3.3", "< 5.0"
spec.add_development_dependency "bundler", ">= 1.15"
spec.add_development_dependency "html-proofer", "~> 3.7"
spec.add_development_dependency "rspec", "~> 3.5"

View File

@ -56,7 +56,11 @@ module Jekyll
end
def drop
@drop ||= Jekyll::SeoTag::Drop.new(@text, @context)
if context.registers[:site].liquid_renderer.respond_to?(:cache)
Jekyll::SeoTag::Drop.new(@text, @context)
else
@drop ||= Jekyll::SeoTag::Drop.new(@text, @context)
end
end
def info

View File

@ -5,6 +5,6 @@ module Liquid; class Tag; end; end
module Jekyll
class SeoTag < Liquid::Tag
VERSION = "2.5.0"
VERSION = "2.6.1"
end
end

View File

@ -54,10 +54,12 @@
{% if site.twitter %}
{% if seo_tag.image %}
<meta name="twitter:card" content="{{ page.twitter.card | default: site.twitter.card | default: "summary_large_image" }}" />
<meta property="twitter:image" content="{{ seo_tag.image.path }}" />
{% else %}
<meta name="twitter:card" content="summary" />
{% endif %}
<meta property="twitter:title" content="{{ seo_tag.page_title }}" />
<meta name="twitter:site" content="@{{ site.twitter.username | replace:"@","" }}" />
{% if seo_tag.author.twitter %}