jekyll-seo-tag 1.3.3 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +27 -3
- data/lib/jekyll-seo-tag/version.rb +1 -1
- data/lib/template.html +22 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d212e590808ac3a0f94a2ddaaad78926fa0fbbde
|
4
|
+
data.tar.gz: 75cc4d3aacbdcab6d95db98b1d7f1b69fe5047a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2a782da804fa7d6bd0e9a7a60783785d7a6b2d2d9a9fe93b1d9f814fda0da16dbc0d86b508d7933ab766eccb9d8d021a85d896f62cb89156e911cc74977369d
|
7
|
+
data.tar.gz: 9a204dcb6acd686174e898e2df5db91e6722067502cc1de4bc9b878c25c74981f46baff1fdaf1fab8d0decdb284707fc036ce34879d6aaa67816d84ca64e6b21
|
data/README.md
CHANGED
@@ -68,7 +68,7 @@ The SEO tag will respect any of the following if included in your site's `_confi
|
|
68
68
|
publisher: 1234
|
69
69
|
```
|
70
70
|
|
71
|
-
* `logo` -
|
71
|
+
* `logo` - URL to a site-wide logo (e.g., `/assets/your-company-logo.png`)
|
72
72
|
* `social` - For [specifying social profiles](https://developers.google.com/structured-data/customize/social-profiles). The following properties are available:
|
73
73
|
* `name` - If the user or organization name differs from the site's name
|
74
74
|
* `links` - An array of links to social media profiles.
|
@@ -78,12 +78,16 @@ The SEO tag will respect the following YAML front matter if included in a post,
|
|
78
78
|
|
79
79
|
* `title` - The title of the post, page, or document
|
80
80
|
* `description` - A short description of the page's content
|
81
|
-
* `image` -
|
81
|
+
* `image` - URL to an image associated with the post, page, or document (e.g., `/assets/page-pic.jpg`)
|
82
82
|
* `author` - Page-, post-, or document-specific author information (see below)
|
83
83
|
|
84
|
+
## Advanced usage
|
85
|
+
|
86
|
+
Jekyll SEO Tag is designed to implement SEO best practices by default and to be the right fit for most sites right out of the box. If for some reason, you need more control over the output, read on:
|
87
|
+
|
84
88
|
### Disabling `<title>` output
|
85
89
|
|
86
|
-
|
90
|
+
If for some reason, you don't want the plugin to output `<title>` tags on each page, simply invoke the plugin within your template like so:
|
87
91
|
|
88
92
|
```
|
89
93
|
{% seo title=false %}
|
@@ -153,3 +157,23 @@ The following options can be set for any particular page. While the default opti
|
|
153
157
|
* `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é")
|
154
158
|
* `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.
|
155
159
|
* `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.
|
160
|
+
|
161
|
+
### Customizing image output
|
162
|
+
|
163
|
+
For most users, setting `image: [path-to-image]` on a per-page basis should be enough. If you need more control over how images are represented, the `image` property can also be an object, with the following options:
|
164
|
+
|
165
|
+
* `path` - The relative path to the image. Same as `image: [path-to-image]`
|
166
|
+
* `twitter` - The relative path to a Twitter-specific image.
|
167
|
+
* `facebook` - The relative path to a Facebook-specific image.
|
168
|
+
* `height` - The height of the Facebook (`og:image`) image
|
169
|
+
* `width` - The width of the Facebook (`og:image`) image
|
170
|
+
|
171
|
+
You can use any of the above, optional properties, like so:
|
172
|
+
|
173
|
+
```yml
|
174
|
+
image:
|
175
|
+
twitter: /img/twitter.png
|
176
|
+
facebook: /img/facebook.png
|
177
|
+
height: 100
|
178
|
+
width: 100
|
179
|
+
```
|
data/lib/template.html
CHANGED
@@ -85,11 +85,19 @@
|
|
85
85
|
{% endif %}
|
86
86
|
|
87
87
|
{% if site.logo %}
|
88
|
-
|
88
|
+
{% assign seo_site_logo = site.logo %}
|
89
|
+
{% unless seo_site_logo contains "://" %}
|
90
|
+
{% assign seo_site_logo = seo_site_logo | prepend: seo_url %}
|
91
|
+
{% endunless %}
|
92
|
+
{% assign seo_site_logo = seo_site_logo | escape %}
|
89
93
|
{% endif %}
|
90
94
|
|
91
95
|
{% if page.image %}
|
92
|
-
|
96
|
+
{% assign seo_page_image = page.image.path | default: page.image.facebook | default: page.image %}
|
97
|
+
{% unless seo_page_image contains "://" %}
|
98
|
+
{% assign seo_page_image = seo_page_image | prepend: seo_url %}
|
99
|
+
{% endunless %}
|
100
|
+
{% assign seo_page_image = seo_page_image | escape %}
|
93
101
|
{% endif %}
|
94
102
|
|
95
103
|
{% if seo_tag.title and seo_title %}
|
@@ -115,7 +123,17 @@
|
|
115
123
|
{% endif %}
|
116
124
|
|
117
125
|
{% if seo_page_image %}
|
118
|
-
|
126
|
+
<meta property="og:image" content="{{ seo_page_image }}" />
|
127
|
+
{% if page.image.height %}
|
128
|
+
<meta property="og:image:height" content="{{ page.image.height }}" />
|
129
|
+
{% endif %}
|
130
|
+
{% if page.image.width %}
|
131
|
+
<meta property="og:image:width" content="{{ page.image.width }}" />
|
132
|
+
{% endif %}
|
133
|
+
{% endif %}
|
134
|
+
|
135
|
+
{% if page.image.twitter %}
|
136
|
+
<meta name="twitter:image" content="{{ page.image.twitter | prepend: seo_url | escape }}" />
|
119
137
|
{% endif %}
|
120
138
|
|
121
139
|
{% if page.date %}
|
@@ -132,7 +150,7 @@
|
|
132
150
|
{% endif %}
|
133
151
|
|
134
152
|
{% if site.twitter %}
|
135
|
-
{% if seo_page_image %}
|
153
|
+
{% if seo_page_image or page.image.twitter %}
|
136
154
|
<meta name="twitter:card" content="summary_large_image" />
|
137
155
|
{% else %}
|
138
156
|
<meta name="twitter:card" content="summary" />
|
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: 1.
|
4
|
+
version: 1.4.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: 2016-
|
11
|
+
date: 2016-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|