Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default defineConfig({
"/configs": "/feed-directory/",
"/components/html2rss-web": "/web-application/",
"/components/html2rss": "/ruby-gem/",
"/components/html2rss-configs": "/html2rss-configs/",
"/components/html2rss-configs": "/creating-custom-feeds/",
"/components": "/",
},
build: {
Expand Down Expand Up @@ -301,7 +301,7 @@ export default defineConfig({
},
{
label: "Write Your Own Feed Configs",
link: "/html2rss-configs",
link: "/creating-custom-feeds",
},
{
label: "About",
Expand Down
21 changes: 17 additions & 4 deletions src/content/docs/creating-custom-feeds.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,17 @@ sidebar:
order: 2
---

import { Aside } from '@astrojs/starlight/components';

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.

**Prerequisites:** You should be familiar with the [Getting Started](/getting-started) guide before diving into custom configurations.

<Aside type="note" title="Release note">
This guide tracks the current documentation tree and may describe features that have not yet shipped in the latest released `html2rss` gem.
If you want the newest integrated behavior, prefer running [`html2rss-web`](/web-application/getting-started) via Docker. The web application ships as a rolling release and usually reflects the latest development state of the gem first. See [Versioning and releases](/web-application/reference/versioning-and-releases/) for details.
</Aside>

---

## When to Use Custom Configs
Expand Down Expand Up @@ -72,7 +79,7 @@ This says: "Find each article, get the title from the h2 anchor, and get the lin

## Your First Config

**Step 1:** Look at the website you want to create a feed for. Right-click → "View Page Source" to see the HTML structure.
**Step 1:** Inspect the website you want to create a feed for. Start with your browser's developer tools to inspect the live DOM. "View Page Source" can still help, but it may miss JavaScript-rendered content.
Comment thread
gildesmarais marked this conversation as resolved.
Outdated

**Step 2:** Create a file called `example.com.yml` with this basic structure:

Expand Down Expand Up @@ -114,15 +121,21 @@ html2rss supports many configuration options:

**Before sharing your config, test it:**

1. **Test with Ruby gem:**
1. **Validate the config first:**

```bash
html2rss validate your-config.yml
```

2. **Then render the feed with the Ruby gem:**

```bash
html2rss feed your-config.yml
```

2. **Test with web app:** Add your config to the `feeds.yml` file and restart your instance
3. **Test with `html2rss-web`:** Add your config to the `feeds.yml` file and restart your instance

3. **Check the output:** Make sure all items have titles, links, and descriptions
4. **Check the output:** Make sure all items have titles, links, and descriptions

---

Expand Down
Loading