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 +4 -4
- data/README.md +13 -10
- data/lib/jekyll-gensocial/generator.rb +4 -1
- data/lib/jekyll-gensocial/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4f241acc0e8eb2ca9f36862c18c8d7db7647b433367e5ce7091c44c809d51a73
|
|
4
|
+
data.tar.gz: edbc4c542e4f3a283d4f9c7abcd36e887faff526a23a3bb41690b35940dde8ef
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
#
|
|
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
|
-
#
|
|
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
|
-
|
|
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? ||
|
|
53
|
+
return if text.nil? || text.empty?
|
|
51
54
|
|
|
52
55
|
write_image(
|
|
53
56
|
:path => site.in_source_dir(image_path),
|