You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/ruby-gem/guides/backward-compatibility.mdx
+24-7Lines changed: 24 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,15 @@ import { Code } from "@astrojs/starlight/components";
7
7
8
8
This page outlines recent breaking changes, purged legacy aliases, and migration steps for older feed configurations.
9
9
10
+
## 0.25.0
11
+
12
+
Upgrade notes for configs and integrators targeting gem **0.25.0**:
13
+
14
+
1.**Removed `link` selector alias** — Custom selector configurations must use the canonical `url` key. The legacy `link` selector alias and exclusivity checks have been removed.
15
+
2.**`auto` article limit (`--limit N`)** — Discovery now supports a configurable article limit (`--limit N` CLI flag, default `20`) and `Html2rss.auto_source(url, limit: 20)` in Ruby.
16
+
3.**Channel metadata in `auto`** — `auto_source` automatically extracts channel-level `author` and `image` (favicon, touch-icon, or OpenGraph images) from the host page.
17
+
4.**Actionable `NoFeedItemsExtracted` error** — `auto` mode fails loud with diagnostic surface classifications (blocked surface, app-shell, unsupported extraction surface) when zero items are found.
18
+
10
19
## 0.24.0
11
20
12
21
Upgrade notes for configs and integrators targeting gem **0.24.0**:
@@ -21,21 +30,28 @@ In previous versions, `html2rss` accepted legacy selector names with a deprecati
|`pubDate`|`published_at`| Item publication date |
25
35
|`updated`|`published_at`| Item publication date |
26
36
27
37
### Migration Example
28
38
29
-
Update any occurrences of `pubDate` or `updated` in your `selectors` block to `published_at`:
39
+
Update any occurrences of `link`, `pubDate`, or `updated` in your `selectors` block to`url` or`published_at`:
30
40
31
41
<Code
32
42
code={`
33
43
# Deprecated / Removed
34
44
selectors:
45
+
link:
46
+
selector: "a.title"
47
+
extractor: "href"
35
48
updated:
36
49
selector: ".date"
37
50
# Current & Required
38
51
selectors:
52
+
url:
53
+
selector: "a.title"
54
+
extractor: "href"
39
55
published_at:
40
56
selector: ".date"
41
57
`}
@@ -68,9 +84,10 @@ Update any occurrences of `pubDate` or `updated` in your `selectors` block to `p
68
84
69
85
When upgrading to modern `html2rss` releases:
70
86
71
-
1.**Rename date selectors**: Ensure date selectors use `published_at` rather than `updated` or `pubDate`.
72
-
2.**Move channel-level transport keys**: Ensure `strategy` and `headers` are defined at the top level of the YAML file.
73
-
3.**Pin Browserless when needed**: If you relied on `auto` falling through to Browserless, set `strategy: browserless` (or `--strategy browserless`).
74
-
4.**Use `enclosure` for RSS media**: Do not rely on `image` becoming an RSS `<enclosure>`; select podcast/media URLs with `enclosure`.
75
-
5.**Prefer `feed_result` for dual-format / cache**: Integrators that need RSS + JSON Feed from one scrape (or Marshal caching) should use `Html2rss.feed_result` and `status.to_h`.
76
-
6.**Validate configurations**: Run `html2rss validate config.yml` to ensure your YAML conforms to the current schema.
87
+
1.**Rename URL selectors**: Ensure article URL selectors use `url` rather than `link`.
88
+
2.**Rename date selectors**: Ensure date selectors use `published_at` rather than `updated` or `pubDate`.
89
+
3.**Move channel-level transport keys**: Ensure `strategy` and `headers` are defined at the top level of the YAML file.
90
+
4.**Pin Browserless when needed**: If you relied on `auto` falling through to Browserless, set `strategy: browserless` (or `--strategy browserless`).
91
+
5.**Use `enclosure` for RSS media**: Do not rely on `image` becoming an RSS `<enclosure>`; select podcast/media URLs with `enclosure`.
92
+
6.**Prefer `feed_result` for dual-format / cache**: Integrators that need RSS + JSON Feed from one scrape (or Marshal caching) should use `Html2rss.feed_result` and `status.to_h`.
93
+
7.**Validate configurations**: Run `html2rss validate config.yml` to ensure your YAML conforms to the current schema.
Copy file name to clipboardExpand all lines: src/content/docs/ruby-gem/reference/auto-source.mdx
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,9 @@ To enable it, add `auto_source: {}` to your configuration:
34
34
such as `window.__NEXT_DATA__`, `window.__NUXT__`, or `window.STATE`. The JSON-state scraper walks those blobs, finds arrays with
35
35
`title`/`url` pairs, and converts them into feed items.
36
36
37
-
`auto_source` also automatically extracts and prepends kicker/teaser labels to article titles when present.
37
+
`auto_source` also automatically extracts and prepends kicker/teaser labels to article titles when present, and discovers channel-level `author` and `image` (favicon, touch-icon, or OpenGraph images) from the host page.
38
+
39
+
You can also restrict the maximum number of discovered articles via the `limit:` keyword argument in Ruby (`Html2rss.auto_source(url, limit: 10)`) or the `--limit` CLI flag.
38
40
39
41
**`json_state` Limitations:** the scraper requires discoverable arrays of hashes containing clear `title` and `url` fields. Minified or
40
42
obfuscated state objects, heavily encoded values, or blobs that require executing embedded functions are ignored.
0 commit comments