Skip to content

Commit 731036c

Browse files
committed
docs(docs): batch low-risk review cleanups
Group the unresolved review items that improve docs consistency without changing onboarding behavior.\n\nAdopt the shared Code component on the reviewed snippets, tighten a few over-explained passages, and apply the direct copy suggestions that clarify terminology and intent. Keep the blocked product-doc issues for a later pass so this commit stays low risk and easy to review.
1 parent bb2134d commit 731036c

8 files changed

Lines changed: 38 additions & 31 deletions

File tree

src/content/docs/creating-custom-feeds.mdx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ sidebar:
66
---
77

88
import { Aside } from "@astrojs/starlight/components";
9+
import Code from "astro/components/Code.astro";
910

1011
When auto-sourcing isn't enough, you can write your own configuration files to create custom RSS feeds for any website. This guide shows you how to take full control with YAML configs.
1112

@@ -167,13 +168,14 @@ Some sites need a little more request budget than the defaults.
167168
- Use `--max-redirects` when the site bounces through several canonicalization or tracking redirects before the real page loads.
168169
- Use `--max-requests` when your config needs more than one request, for example pagination or other follow-up fetches.
169170

170-
```bash
171-
html2rss feed your-config.yml --max-redirects 10
171+
<Code
172+
code={`html2rss feed your-config.yml --max-redirects 10
172173
html2rss feed your-config.yml --max-requests 5
173-
html2rss auto https://example.com/blog --max-redirects 10 --max-requests 5
174-
```
174+
html2rss auto https://example.com/blog --max-redirects 10 --max-requests 5`}
175+
lang="bash"
176+
/>
175177

176-
Keep these values as low as possible. If a site only needs one extra redirect, prefer `--max-redirects 4` over a much larger number.
178+
Keep these values tight. Raise them only when the site proves it needs more.
177179

178180
## Add It To html2rss-web
179181

src/content/docs/getting-started.mdx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ sidebar:
55
order: 1
66
---
77

8+
import Code from "astro/components/Code.astro";
9+
810
This page points to the main onboarding flow.
911

1012
## Start Here
@@ -30,14 +32,10 @@ That guide is the canonical setup flow for:
3032

3133
If you are working directly with the gem instead of `html2rss-web`, start with:
3234

33-
```bash
34-
html2rss auto https://example.com/blog
35-
```
35+
<Code code={`html2rss auto https://example.com/blog`} lang="bash" />
3636

3737
If the target site is unusually redirect-heavy or needs extra follow-up requests, the CLI also supports:
3838

39-
```bash
40-
html2rss auto https://example.com/blog --max-redirects 10 --max-requests 5
41-
```
39+
<Code code={`html2rss auto https://example.com/blog --max-redirects 10 --max-requests 5`} lang="bash" />
4240

4341
For config-driven runs, the same flags are available on `html2rss feed`.

src/content/docs/ruby-gem/how-to/custom-http-requests.mdx

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ title: "Custom HTTP Requests"
33
description: "Learn how to customize HTTP requests with custom headers, authentication, and API interactions for html2rss."
44
---
55

6-
Some websites require custom HTTP headers, authentication, or other request settings to access their content. `html2rss` lets you customize requests for those cases.
6+
import Code from "astro/components/Code.astro";
7+
8+
Some sites only work when requests carry the headers, tokens, or cookies your browser uses. `html2rss` supports those cases without changing the rest of your feed workflow.
79

810
Keep this structure in mind:
911

@@ -25,8 +27,8 @@ You might need custom HTTP requests when:
2527

2628
Add a `headers` section to your feed configuration. This example is a complete, valid config:
2729

28-
```yaml
29-
headers:
30+
<Code
31+
code={`headers:
3032
User-Agent: "Mozilla/5.0 (compatible; html2rss/1.0)"
3133
Authorization: "Bearer YOUR_API_TOKEN"
3234
Accept: "application/json"
@@ -38,15 +40,16 @@ selectors:
3840
title:
3941
selector: "title"
4042
url:
41-
selector: "url"
42-
```
43+
selector: "url"`}
44+
lang="yaml"
45+
/>
4346

4447
## Request Controls
4548

4649
Request budgets are configured under `request`, not as top-level keys:
4750

48-
```yaml
49-
headers:
51+
<Code
52+
code={`headers:
5053
User-Agent: "Mozilla/5.0 (compatible; html2rss/1.0)"
5154
request:
5255
max_redirects: 5
@@ -60,8 +63,9 @@ selectors:
6063
selector: h2
6164
url:
6265
selector: a
63-
extractor: href
64-
```
66+
extractor: href`}
67+
lang="yaml"
68+
/>
6569

6670
- `request.max_redirects` limits redirect hops
6771
- `request.max_requests` limits the total request budget for the feed build

src/content/docs/ruby-gem/how-to/handling-dynamic-content.mdx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ title: Handling Dynamic Content
33
description: "Learn how to handle JavaScript-heavy websites and dynamic content with html2rss. Use browserless strategy for sites that load content dynamically."
44
---
55

6+
import Code from "astro/components/Code.astro";
7+
68
Some websites load their content dynamically using JavaScript. The default `html2rss` strategy might not see this content.
79

810
## Solution
@@ -11,8 +13,8 @@ Use the [`browserless` strategy](/ruby-gem/reference/strategy) to render JavaScr
1113

1214
Keep the strategy at the top level and put request-specific options under `request`:
1315

14-
```yaml
15-
strategy: browserless
16+
<Code
17+
code={`strategy: browserless
1618
request:
1719
max_redirects: 5
1820
max_requests: 6
@@ -29,8 +31,9 @@ selectors:
2931
selector: h2
3032
url:
3133
selector: a
32-
extractor: href
33-
```
34+
extractor: href`}
35+
lang="yaml"
36+
/>
3437

3538
## When to Use Browserless
3639

src/content/docs/ruby-gem/reference/cli-reference.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ html2rss auto https://example.com/articles
2424
# Force browserless for JavaScript-heavy pages
2525
html2rss auto https://example.com/app --strategy browserless
2626

27-
# Override request budgets at runtime
27+
# Set custom request budgets
2828
html2rss auto https://example.com/app --strategy browserless --max-redirects 5 --max-requests 6
2929

3030
# Hint the item selector while keeping auto enhancement

src/content/docs/ruby-gem/reference/strategy.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The `strategy` key defines how `html2rss` fetches a website's content.
88
- **`faraday`** (default): Makes a direct HTTP request. It is fast but does not execute JavaScript.
99
- **`browserless`**: Renders the website in a headless Chrome browser, which is necessary for JavaScript-heavy sites.
1010

11-
`strategy` stays a top-level config key. Request-specific controls now live under `request`.
11+
`strategy` is a top-level config key. Request-specific controls live under `request`.
1212

1313
## `browserless`
1414

src/content/docs/ruby-gem/reference/wordpress-api.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,22 +67,22 @@ If `content.rendered` is blank, the scraper falls back to `excerpt.rendered`.
6767

6868
- The scraper uses the shared request session, so it participates in the same request safety model as the rest of the feed build.
6969
- It resolves relative API links against `channel.url`.
70-
- It currently stores WordPress category IDs as strings because category-name resolution is not implemented yet.
71-
- It currently does not resolve `featured_media` into an image URL.
70+
- It keeps WordPress category IDs as strings; category-name resolution is not implemented yet.
71+
- It does not resolve `featured_media` into an image URL.
7272

7373
## When To Use It
7474

7575
Prefer `wordpress_api` when:
7676

7777
- The page is clearly powered by WordPress
7878
- The REST API is public
79-
- You want more stable extraction than CSS selectors or heuristic HTML scraping
79+
- You want a more stable source than CSS selectors or heuristic HTML scraping
8080

8181
Prefer manual selectors when:
8282

8383
- The site blocks or customizes the API heavily
8484
- You need fields that are not exposed by the post endpoint
85-
- You want complete control over item filtering or presentation
85+
- You need full control over filtering or presentation
8686

8787
## Related Docs
8888

src/content/docs/web-application/how-to/deployment.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: "Deploy html2rss-web to production with Docker. Learn best practice
55

66
import DockerComposeSnippet from "../../../../components/docs/DockerComposeSnippet.astro";
77

8-
html2rss-web ships on Docker Hub, so you can launch it wherever Docker runs. Start with the official [`docker-compose.yml`](https://github.com/html2rss/html2rss-web/blob/master/docker-compose.yml) from the [Installation Guide](/web-application/getting-started) as your baseline.
8+
html2rss-web ships on Docker Hub, so you can launch this self-hosted service wherever Docker runs. Start with the official [`docker-compose.yml`](https://github.com/html2rss/html2rss-web/blob/master/docker-compose.yml) from the [Installation Guide](/web-application/getting-started) as your baseline.
99

1010
If you have not yet created a local instance, complete the [Getting Started guide](/web-application/getting-started) first. It walks through the one-time project directory setup, downloading the reference compose file, and confirming the application locally—steps we will build upon here.
1111

0 commit comments

Comments
 (0)