jekyll-gensocial 1.0.1 → 1.0.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ef354c90190e2f2f97135142004b6f22120202d5aeb186fc434b53fd9d090f6e
4
- data.tar.gz: e2530f8c7ec966fb98a4dc86ca91dfc25aee937db78e5e1cfb906bb2ddaf9ce8
3
+ metadata.gz: 4f241acc0e8eb2ca9f36862c18c8d7db7647b433367e5ce7091c44c809d51a73
4
+ data.tar.gz: edbc4c542e4f3a283d4f9c7abcd36e887faff526a23a3bb41690b35940dde8ef
5
5
  SHA512:
6
- metadata.gz: ebc55a209be45bdef4f0210109a15af9f8f6e123e422cc54eb9379c2a08eed80dd2eee9bb744a5242b32d04126953c6c21e9a1c7f02254a9d2581fc17630a673
7
- data.tar.gz: 8d1399f1fcf76c0efb0c2020e4b0edef2ff6e452c90e6627a01adf9fc47ba5f896bfa817235ba8797ddb0ac62a0bb5210286427fb7fee95699757b8cd3cf46db
6
+ metadata.gz: 6b265a6bfcc969ece0e9f128ae97355bb5d2b6241faef132dd810149e2dba8f35982c328ba2e1cec95c442cdcbf7672e6742640c1c36c589ac81f2855a59ac5e
7
+ data.tar.gz: 45cb7c07cbc78899141b0083ccdd7ebf26f6273ec0b935350485ca899ec2f74305cbfd9565ea1a36fe1020b1dbfd401d302062058c5aa2038ea25eec5bd43fc0
data/README.md CHANGED
@@ -19,6 +19,12 @@ First install ImageMagick (and GhostScript if you don't supply your own font):
19
19
  brew install pkg-config imagemagick [gs]
20
20
  ```
21
21
 
22
+ #### Linux and Windows
23
+
24
+ _Haven't tried yet. If you have, please submit a PR._
25
+
26
+ ### Jekyll
27
+
22
28
  Add `gem "jekyll-gensocial"` to the `:jekyll_plugins` group in your `Gemfile`:
23
29
 
24
30
  ```ruby
@@ -29,12 +35,6 @@ group :jekyll_plugins do
29
35
  end
30
36
  ```
31
37
 
32
- #### Linux and Windows
33
-
34
- _Haven't tried yet. If you have, please submit a PR._
35
-
36
- ### Jekyll
37
-
38
38
  Add these lines to your site's `_config.yml`:
39
39
 
40
40
  ```yml
@@ -49,9 +49,9 @@ plugins:
49
49
  You can customize the image's background layer and text appearance from your `_config.yml`.
50
50
 
51
51
  ```yaml
52
- # These are the default settings
52
+ # _config.yml
53
53
 
54
- jekyll-gensocial:
54
+ jekyll-gensocial: # These are the default settings
55
55
  enabled: true # Disables the output
56
56
  size: # The size of the overall canvas
57
57
  width: 1920
@@ -117,7 +117,7 @@ The contents of your post goes here.
117
117
  ### Example
118
118
 
119
119
  ```yaml
120
- # Features a background image, text fill color and custom font
120
+ # _config.yml
121
121
 
122
122
  jekyll-gensocial:
123
123
  background:
@@ -147,7 +147,10 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/boyvan
147
147
 
148
148
  ### Stuff to work on
149
149
 
150
- * Expand testing to verify image output.
150
+ - [ ] Expand testing to verify generated images.
151
+ - [ ] Add support for setting a background color (instead of just an image).
152
+ - [x] Don't overwrite existing images per default.
153
+ - [ ] Introduce a way to update images that have changed.
151
154
 
152
155
  ## License
153
156
 
@@ -23,6 +23,9 @@ module Jekyll
23
23
  def process_docs(docs, site:, config:)
24
24
  docs.each do |doc|
25
25
  doc_config = Utils.deep_merge_hashes(config, doc.data.fetch("jekyll-gensocial", {}))
26
+
27
+ next if doc.data["image"].nil? || File.exist?(site.in_source_dir(doc.data["image"]))
28
+
26
29
  process_doc(doc, :site => site, :config => doc_config)
27
30
  end
28
31
  end
@@ -47,7 +50,7 @@ module Jekyll
47
50
  text = doc.data["title"] || image_config[:text].string
48
51
  image_path = doc.data["image"]
49
52
 
50
- return if text.nil? || image_path.nil?
53
+ return if text.nil? || text.empty?
51
54
 
52
55
  write_image(
53
56
  :path => site.in_source_dir(image_path),
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Jekyll
4
4
  module Gensocial
5
- VERSION = "1.0.1"
5
+ VERSION = "1.0.2"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-gensocial
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Boy van Amstel