jekyll-og-image 1.3.0 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +55 -3
- data/lib/jekyll_og_image/configuration.rb +6 -2
- data/lib/jekyll_og_image/generator.rb +2 -0
- data/lib/jekyll_og_image/version.rb +1 -1
- metadata +3 -4
- data/.rspec_status +0 -27
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e246a8f729a0d3597ecdbb0b9b1b15083c6e23121d2f670c9b0911a16e0465eb
|
4
|
+
data.tar.gz: 203d4fa8e80623c91072f9eb5b02468085cca2a8cde171d325c1068eb7ccc2a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1074de3a876df6c1856e4162aa260424b2972f9ae238bbc1060a36ce73f4cc82490e1ccf6d295e25f4a5e2719e54dae7ff199d779430856515e069a336a6909b
|
7
|
+
data.tar.gz: d9472379c623f304ab3a0ab95fd83a79a2ba9ccdc559319d747cec9d19432d7456e6a9bd036c13fab2f76fd8c12c2624ccefa5b647e99f6bbf18faa6127254fc
|
data/README.md
CHANGED
@@ -26,11 +26,50 @@ plugins:
|
|
26
26
|
|
27
27
|
Jekyll OG Image works together with [jekyll-seo-tag](https://github.com/jekyll/jekyll-seo-tag) plugin. It automatically generates open graph images for posts and inserts them into the posts metadata.
|
28
28
|
|
29
|
+
## Configuration
|
30
|
+
|
31
|
+
The plugin can be configured in the `_config.yml` file or in the post's front matter.
|
32
|
+
|
33
|
+
The following configuration options are available:
|
34
|
+
|
35
|
+
* `output_dir` – The directory where the generated images will be saved. Default: `assets/images/og`
|
36
|
+
|
37
|
+
* `force` – If set to `true`, the plugin will generate an image for every post, even if the post already has an image. Default: `false`
|
38
|
+
|
39
|
+
* `verbose` – If set to `true`, the plugin will output additional information about the image generation process. Default: `false`
|
40
|
+
|
41
|
+
* `skip_drafts` – If set to `true`, the plugin will skip post drafts when generating images. Default: `true`
|
42
|
+
|
43
|
+
* `canvas` – The canvas configuration options:
|
44
|
+
* `background_color` – The background color of the canvas. Default: `#FFFFFF`
|
45
|
+
* `background_image` – The background image of the canvas. Default: `nil`
|
46
|
+
|
47
|
+
* `header` – The header configuration options:
|
48
|
+
* `font_family` – The font family of the header text. Default: `Helvetica, Bold`
|
49
|
+
* `color` – The color of the header text. Default: `#2f313d`
|
50
|
+
|
51
|
+
* `content` – The content configuration options:
|
52
|
+
* `font_family` – The font family of the content text. Default: `Helvetica, Regular`
|
53
|
+
* `color` – The color of the content text. Default: `#535358`
|
54
|
+
|
55
|
+
* `border_bottom` – The border bottom configuration options:
|
56
|
+
* `width` – The width of the border bottom. Default: `20`
|
57
|
+
* `fill` – The array of colors to fill the border bottom. Default: `["#000000"]`
|
58
|
+
|
59
|
+
* `domain` – The domain name to use in the image. Default: `nil`
|
60
|
+
|
61
|
+
* `image` – Path to the image to use as the logo. Default: `nil`
|
62
|
+
|
29
63
|
## Examples
|
30
64
|
|
65
|
+
Configuration can be defined on the site level or on the post level.
|
66
|
+
|
67
|
+
For a side wide level configuration, edit your `_config.yml`, for a post level configuration, edit the post's front matter.
|
68
|
+
|
31
69
|
### Single Color
|
32
70
|
|
33
71
|
```yaml
|
72
|
+
# _config.yml
|
34
73
|
og_image:
|
35
74
|
output_dir: "assets/images/og"
|
36
75
|
domain: "igor.works"
|
@@ -45,6 +84,7 @@ og_image:
|
|
45
84
|
### Multiple Colors
|
46
85
|
|
47
86
|
```yaml
|
87
|
+
# _config.yml
|
48
88
|
og_image:
|
49
89
|
output_dir: "assets/images/og"
|
50
90
|
image: "/assets/images/igor.jpeg"
|
@@ -64,6 +104,7 @@ og_image:
|
|
64
104
|
### Background Color and Text Color
|
65
105
|
|
66
106
|
```yaml
|
107
|
+
# _config.yml
|
67
108
|
og_image:
|
68
109
|
output_dir: "/assets/og"
|
69
110
|
image: "/assets/images/igor.jpeg"
|
@@ -90,11 +131,10 @@ og_image:
|
|
90
131
|
### Background Image
|
91
132
|
|
92
133
|
```yaml
|
134
|
+
# _config.yml
|
93
135
|
og_image:
|
94
136
|
output_dir: "/assets/og"
|
95
137
|
image: "/assets/images/igor.jpeg"
|
96
|
-
canvas:
|
97
|
-
background_image: "/assets/images/bc_3.jpg"
|
98
138
|
header:
|
99
139
|
font_family: "Roboto, Bold"
|
100
140
|
color: "#333333"
|
@@ -103,6 +143,18 @@ og_image:
|
|
103
143
|
color: "#333333"
|
104
144
|
force: false
|
105
145
|
domain: "igor.works"
|
146
|
+
|
147
|
+
# _posts/2024-02-15-traefik-tunning-for-rails-applications-part-1.md
|
148
|
+
---
|
149
|
+
title: Traefik Tuning for Rails Applications (part 1)
|
150
|
+
layout: post
|
151
|
+
tags:
|
152
|
+
- Rails
|
153
|
+
- Traefik
|
154
|
+
- Kamal
|
155
|
+
og_image:
|
156
|
+
canvas:
|
157
|
+
background_image: "/assets/images/bc_3.jpg"
|
106
158
|
```
|
107
159
|
|
108
160
|
![Example 4](examples/4.png)
|
@@ -118,4 +170,4 @@ og_image:
|
|
118
170
|
|
119
171
|
## License
|
120
172
|
|
121
|
-
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
173
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
@@ -54,11 +54,15 @@ class JekyllOgImage::Configuration
|
|
54
54
|
end
|
55
55
|
|
56
56
|
def force?
|
57
|
-
@raw_config["force"]
|
57
|
+
@raw_config["force"].nil? ? false : @raw_config["force"]
|
58
58
|
end
|
59
59
|
|
60
60
|
def verbose?
|
61
|
-
@raw_config["verbose"]
|
61
|
+
@raw_config["verbose"].nil? ? false : @raw_config["verbose"]
|
62
|
+
end
|
63
|
+
|
64
|
+
def skip_drafts?
|
65
|
+
@raw_config["skip_drafts"].nil? ? true : @raw_config["skip_drafts"]
|
62
66
|
end
|
63
67
|
|
64
68
|
def canvas
|
@@ -9,6 +9,8 @@ class JekyllOgImage::Generator < Jekyll::Generator
|
|
9
9
|
FileUtils.mkdir_p File.join(site.config["source"], base_path)
|
10
10
|
|
11
11
|
site.posts.docs.each do |post|
|
12
|
+
next if post.draft? && JekyllOgImage.config.skip_drafts?
|
13
|
+
|
12
14
|
path = File.join(site.config["source"], base_path, "#{post.data['slug']}.png")
|
13
15
|
|
14
16
|
if !File.exist?(path) || JekyllOgImage.config.force?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-og-image
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Igor Alexandrov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll-seo-tag
|
@@ -80,7 +80,6 @@ extensions: []
|
|
80
80
|
extra_rdoc_files: []
|
81
81
|
files:
|
82
82
|
- ".rspec"
|
83
|
-
- ".rspec_status"
|
84
83
|
- ".rubocop.yml"
|
85
84
|
- CODE_OF_CONDUCT.md
|
86
85
|
- LICENSE.txt
|
@@ -120,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
120
119
|
- !ruby/object:Gem::Version
|
121
120
|
version: '0'
|
122
121
|
requirements: []
|
123
|
-
rubygems_version: 3.5.
|
122
|
+
rubygems_version: 3.5.11
|
124
123
|
signing_key:
|
125
124
|
specification_version: 4
|
126
125
|
summary: Jekyll plugin to generate GitHub-style open graph images
|
data/.rspec_status
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
example_id | status | run_time |
|
2
|
-
------------------------------------------------------- | ------ | --------------- |
|
3
|
-
./spec/jekyll_og_image/configuration_spec.rb[1:1:1] | passed | 0.00097 seconds |
|
4
|
-
./spec/jekyll_og_image/configuration_spec.rb[1:1:2:1] | passed | 0.00005 seconds |
|
5
|
-
./spec/jekyll_og_image/configuration_spec.rb[1:2:1:1] | passed | 0.00005 seconds |
|
6
|
-
./spec/jekyll_og_image/configuration_spec.rb[1:2:2:1] | passed | 0.00003 seconds |
|
7
|
-
./spec/jekyll_og_image/configuration_spec.rb[1:3:1:1] | passed | 0.00026 seconds |
|
8
|
-
./spec/jekyll_og_image/configuration_spec.rb[1:3:2:1] | passed | 0.00003 seconds |
|
9
|
-
./spec/jekyll_og_image/configuration_spec.rb[1:4:1:1] | passed | 0.00003 seconds |
|
10
|
-
./spec/jekyll_og_image/configuration_spec.rb[1:4:2:1] | passed | 0.00003 seconds |
|
11
|
-
./spec/jekyll_og_image/configuration_spec.rb[1:5:1:1] | passed | 0.00039 seconds |
|
12
|
-
./spec/jekyll_og_image/configuration_spec.rb[1:5:2:1] | passed | 0.00004 seconds |
|
13
|
-
./spec/jekyll_og_image/configuration_spec.rb[1:6:1:1] | passed | 0.00004 seconds |
|
14
|
-
./spec/jekyll_og_image/configuration_spec.rb[1:6:2:1] | passed | 0.00003 seconds |
|
15
|
-
./spec/jekyll_og_image/configuration_spec.rb[1:7:1:1] | passed | 0.00004 seconds |
|
16
|
-
./spec/jekyll_og_image/configuration_spec.rb[1:7:1:2:1] | passed | 0.00005 seconds |
|
17
|
-
./spec/jekyll_og_image/configuration_spec.rb[1:8:1:1] | passed | 0.00004 seconds |
|
18
|
-
./spec/jekyll_og_image/configuration_spec.rb[1:8:2:1] | passed | 0.00006 seconds |
|
19
|
-
./spec/jekyll_og_image/configuration_spec.rb[1:9:1:1] | passed | 0.00004 seconds |
|
20
|
-
./spec/jekyll_og_image/configuration_spec.rb[1:9:2:1] | passed | 0.00003 seconds |
|
21
|
-
./spec/jekyll_og_image/configuration_spec.rb[1:10:1:1] | passed | 0.00003 seconds |
|
22
|
-
./spec/jekyll_og_image/configuration_spec.rb[1:10:2:1] | passed | 0.00003 seconds |
|
23
|
-
./spec/jekyll_og_image/configuration_spec.rb[1:11:1:1] | passed | 0.00003 seconds |
|
24
|
-
./spec/jekyll_og_image/configuration_spec.rb[1:11:2:1] | passed | 0.00003 seconds |
|
25
|
-
./spec/jekyll_og_image/version_spec.rb[1:1] | passed | 0.00003 seconds |
|
26
|
-
./spec/jekyll_og_image_spec.rb[1:1] | passed | 0.24499 seconds |
|
27
|
-
./spec/jekyll_og_image_spec.rb[1:2] | passed | 0.04171 seconds |
|