jekyll-devto 0.2.0 → 0.3.0

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: 1aa5e1f448c0e19e840473d8829de5c76d9db2f9f27c9e919243086d07d2b7f9
4
- data.tar.gz: 9abb009ac797c5009074a1120fca05c0fd15771a7404afa4b3f3ea44f53f4574
3
+ metadata.gz: e5d68c73dff2c64c76de9bd3e8fc0d9e130d89cc9abc0f49473b69ce4d55a2e3
4
+ data.tar.gz: 791dfd16298f0b7d0ca0126594419a812fc3a84aa3da46e0c8da7690a6a45c0a
5
5
  SHA512:
6
- metadata.gz: 3557c4a83b0c514893f5acbce8f0ff78fecab9c2139d02a06c65bbfd5299d2324c8d2f88d83a432358a58d1ff93e7accbb941d552e0421364088d052af4d80a8
7
- data.tar.gz: 25efecb7281df14f9aadb89cf25a756aba07fa99dc1f73b07b63e7ee401bb0e7f155367f91002a9efd26ed334f40433dc3e2af70005a6440e07fe4db847dba65
6
+ metadata.gz: 38c78047e58a1557a7327d3b95104342bf5920ce365dfb3ea3c8665227ab83297c0c9bed6dd0e30ea1a499e5af28d8b7b7fcc24374c5e234384dec4116c722c2
7
+ data.tar.gz: 92cc3df16600b846a8a08868033f54e051e7415d747671a0e88e730c95f7e220e942eb14b3be61700e181a08a220db23ec9ea4836140b1cc07220c674231d3d4
data/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.3.0](https://github.com/JuanVqz/jekyll-devto/compare/v0.2.0...v0.3.0) (2026-10-02)
4
+
5
+
6
+ ### ⚠ BREAKING CHANGES
7
+
8
+ * **feed:** posts no longer get their image as the dev.to cover by default. Set devto: { cover: image } in _config.yml to keep the 0.2.0 behavior.
9
+
10
+ ### Features
11
+
12
+ * **feed:** add a dev.to cover only when asked for ([#14](https://github.com/JuanVqz/jekyll-devto/issues/14)) ([9e9b43f](https://github.com/JuanVqz/jekyll-devto/commit/9e9b43f9422cee3ef4fd7a47aa483347bf5bfde8))
13
+
3
14
  ## [0.2.0](https://github.com/JuanVqz/jekyll-devto/compare/v0.1.0...v0.2.0) (2026-10-02)
4
15
 
5
16
 
data/README.md CHANGED
@@ -49,16 +49,22 @@ All optional.
49
49
  devto:
50
50
  path: "/devto.xml" # where the feed is written
51
51
  limit: 20 # newest posts to include (default: all)
52
+ cover: image # use each post's image as its dev.to cover (default: no cover)
52
53
  ```
53
54
 
54
55
  To keep a post off dev.to, set `devto: false` in its front matter.
55
56
 
56
- **Cover image.** `jekyll-devto publish` gives each post a dev.to cover: `devto_cover` from the post's front matter, or else the post's `image` (a path, a URL, or `{ path: ... }`, which is what [jekyll-og-image](https://github.com/igor-alexandrov/jekyll-og-image) and Chirpy use). A cover already set on the dev.to draft is kept.
57
+ **Cover image.** No cover by default. Many Open Graph images, including the ones [jekyll-og-image](https://github.com/igor-alexandrov/jekyll-og-image) and Chirpy produce, already carry the post title, which dev.to shows right under the cover, and without a cover dev.to generates its own share image. To add one:
58
+
59
+ - `devto_cover:` on a post sets that post's cover, and always wins. `devto_cover: true` uses the post's `image`, and `devto_cover: false` turns the cover off for that post.
60
+ - `cover: image` under `devto:` in `_config.yml` uses each post's `image` (a path, a URL, or `{ path: ... }`) for every post, for sites whose images have no title on them.
57
61
 
58
62
  ```yaml
59
- devto_cover: /assets/img/devto-cover.png # optional
63
+ devto_cover: /assets/img/devto-cover.png # optional, per post
60
64
  ```
61
65
 
66
+ `jekyll-devto publish` adds the cover to the draft; a cover already set on the dev.to draft is kept. dev.to crops covers to 1000×420.
67
+
62
68
  **Tags and series.** dev.to keeps only the first four tags, as lowercase letters and digits (`tailwind-css` becomes `tailwindcss`). `devto_tags` picks them for dev.to; it is used for the import and also replaces the tags of a draft that was already imported. `devto_series` puts the post in a dev.to series, created if it does not exist; a series already set on the draft is kept.
63
69
 
64
70
  ```yaml
@@ -29,9 +29,23 @@
29
29
  <category>{{ tag | xml_escape }}</category>
30
30
  {%- endfor %}
31
31
  <description>{{ post.description | default: post.excerpt | strip_html | strip_newlines | truncatewords: 60 | xml_escape }}</description>
32
- {%- comment -%} The dev.to cover: devto_cover, else the post image (jekyll-og-image sets it). {%- endcomment -%}
33
- {%- comment -%} Unlike content links, image paths leave baseurl out (Chirpy and jekyll-og-image add it when rendering). {%- endcomment -%}
34
- {%- assign cover = post.devto_cover | default: post.image | devto_url: site_root %}
32
+ {%- comment -%}
33
+ The dev.to cover is opt-in: many Open Graph images carry the post title, which dev.to
34
+ already shows under the cover, and without one dev.to generates its own share image.
35
+ devto_cover on a post always wins (false turns it off, true uses the post image);
36
+ `devto: { cover: image }` in _config.yml uses each post's image. Unlike content
37
+ links, image paths leave baseurl out (Chirpy and jekyll-og-image add it when
38
+ rendering), so the cover needs it.
39
+ {%- endcomment -%}
40
+ {%- assign cover = "" %}
41
+ {%- if post.devto_cover == false %}
42
+ {%- elsif post.devto_cover == true %}
43
+ {%- assign cover = post.image | devto_url: site_root %}
44
+ {%- elsif post.devto_cover %}
45
+ {%- assign cover = post.devto_cover | devto_url: site_root %}
46
+ {%- elsif devto.cover == "image" or devto.cover == true %}
47
+ {%- assign cover = post.image | devto_url: site_root %}
48
+ {%- endif %}
35
49
  {%- if cover != "" %}
36
50
  <devto:cover>{{ cover | xml_escape }}</devto:cover>
37
51
  {%- endif %}
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Jekyll
4
4
  module Devto
5
- VERSION = '0.2.0'
5
+ VERSION = '0.3.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-devto
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Vásquez