diff --git a/src/content/docs/about.mdx b/src/content/docs/about.mdx index 25b40e40..86fc252a 100644 --- a/src/content/docs/about.mdx +++ b/src/content/docs/about.mdx @@ -1,31 +1,23 @@ --- title: About html2rss -description: Learn about html2rss, the open-source RSS feed generator that helps you follow any website. Discover our mission, principles, and the team behind this powerful tool. +description: html2rss is an open-source tool that turns web pages into RSS or JSON Feed. Read what it is for and who maintains it. --- -`html2rss` is an open-source project dedicated to empowering you to take control of your web content. In an age where many websites don't offer traditional RSS feeds, `html2rss` provides a robust and flexible solution to convert almost any HTML content into a structured RSS format. +`html2rss` is an open-source project that converts HTML pages into RSS or JSON Feed. Many sites publish no feed. html2rss builds one from the page itself. -Since its founding in 2018, the project has evolved into a comprehensive suite of tools designed to help you create and consume RSS feeds effortlessly. +The project started in 2018. It now includes the Ruby gem, the `html2rss-web` application, a catalog of curated feed configs and this documentation site. --- -## Our Vision and Principles +## Vision and Principles -Our mission is to provide a simple, powerful, and accessible tool that enables individuals and developers to create custom RSS feeds from any web page. We believe in the power of open standards and the freedom to access information on your own terms. +The goal is a simple tool that lets anyone create a feed from a web page and read it on their own terms. It builds on open standards. -Our project is guided by these core principles: +- **User control:** You choose what you follow and where you read it. +- **Simple by default:** Paste a URL to get a feed. Write a config when you need exact control. +- **Open source:** Anyone can read the code and contribute. +- **Reliable:** Releases are tested, and breaking changes are documented. -- **User Empowerment:** Giving you the tools to customize your web experience. -- **Simplicity & Power:** Offering an easy-to-use interface with powerful underlying capabilities. -- **Open Source:** Fostering a collaborative environment where the community can contribute and improve the project. -- **Reliability:** Striving for a stable and dependable tool that consistently delivers. +See [Get Involved](/get-involved/) for the roadmap and ways to help. -For insights into our ongoing development, project roadmap, and how you can get involved, please visit our [Get Involved](/get-involved/) page. - ---- - -### The Team - -`html2rss` is maintained by a dedicated group of volunteers and contributors from around the world. We are passionate about open source and committed to continuously improving the project. - -Want to join us? Check out our [Contributing Guide](/get-involved/contributing/)! +Volunteers maintain `html2rss`. To join, read the [Contributing Guide](/get-involved/contributing/). diff --git a/src/content/docs/common-use-cases.mdx b/src/content/docs/common-use-cases.mdx index 9ee56f75..a4c3287a 100644 --- a/src/content/docs/common-use-cases.mdx +++ b/src/content/docs/common-use-cases.mdx @@ -15,13 +15,13 @@ Many blogs and creator sites do not publish feeds. ### Job Hunting -Track job postings from multiple company websites in one place. Never miss an opportunity again. +Track job postings from several company sites in one reader. **Example:** Track a company careers page or a narrower role-specific listing. ### Local News -Follow your local newspaper or community website to stay informed about your neighborhood. +Follow your local newspaper or community site. **Example:** Subscribe to local news sites, community forums, and city government updates from one reader. @@ -33,7 +33,7 @@ Follow new papers and research in your field from multiple sources. ### Product Updates -Get notified when software you use releases updates, new features, or security patches. +Get notified of releases, new features and security patches. **Example:** Track release notes, changelog pages, and product blogs. @@ -53,7 +53,7 @@ Track what your competitors are posting about - new products, features, or annou ### Industry News -Follow multiple industry publications in one feed to stay ahead of trends. +Follow several industry publications in one reader. **Example:** Aggregate trade publications, company blogs, and research updates in one reader. @@ -65,7 +65,7 @@ Monitor customer feedback and support requests across different platforms. ### Content Marketing -Follow industry influencers and competitors for content inspiration. +Follow industry sites and competitors. **Example:** Track competitor blogs, industry newsletters, and thought leadership content in one place. diff --git a/src/content/docs/creating-custom-feeds.mdx b/src/content/docs/creating-custom-feeds.mdx index fcff59eb..32429737 100644 --- a/src/content/docs/creating-custom-feeds.mdx +++ b/src/content/docs/creating-custom-feeds.mdx @@ -75,7 +75,30 @@ Bind-mount a feeds file (see production Compose comments): lang="yaml" /> -Feeds are served as `.rss` / `.json` paths on your instance (for example `/example.com/blog.rss`). +The file lists each feed under `feeds:`, keyed by name: + + + +- The instance serves the feed `example` at `/example.rss`. +- Your file replaces the shipped `config/feeds.yml`, including its `auth.accounts` block. Start from the shipped file and keep what you need. +- The instance reads the file at startup. Restart the container after each edit: `docker compose restart`. ## Contribute to the Feed Directory diff --git a/src/content/docs/feed-directory/index.mdx b/src/content/docs/feed-directory/index.mdx index 028653ba..81057d8f 100644 --- a/src/content/docs/feed-directory/index.mdx +++ b/src/content/docs/feed-directory/index.mdx @@ -17,16 +17,16 @@ import FeedDirectory from "../../../components/feed-directory/FeedDirectory.astr Browse pre-built feed configs by site name. The list loads from the active `html2rss-web` instance (`GET /api/v1/configs`). Search, filter by topic or language, and paginate results. Export OPML for the current filter set when subscribing to several feeds at once. -Need the main onboarding path first? Start with [Getting Started](/getting-started/) and create a feed from your own page URL. The directory below is the fallback path when a curated config already covers your site. +To create a feed from your own page URL, start with [Getting Started](/getting-started/). Use the directory when a curated config already covers your site. Need a different instance? Use **Change instance** in the directory header, self-host your own, or find more options on the [community-run wiki](https://github.com/html2rss/html2rss-web/wiki/Instances). -[🚀 Host Your Own Instance (and share it!)](/web-application/deployment/) +[Host your own instance](/web-application/deployment/) --- ## Contribute to the Directory -The feed configurations in this directory are community-driven. If you've created a new feed configuration, we encourage you to share it with the community. +Contributors write the configs in this directory. To add yours, open a pull request. [Contribute on GitHub](https://github.com/html2rss/html2rss-configs/tree/master/lib/html2rss/configs) diff --git a/src/content/docs/get-involved/contributing.mdx b/src/content/docs/get-involved/contributing.mdx index 38698a78..b17a2002 100644 --- a/src/content/docs/get-involved/contributing.mdx +++ b/src/content/docs/get-involved/contributing.mdx @@ -5,53 +5,53 @@ description: Learn how to contribute to the html2rss project import { Code } from "@astrojs/starlight/components"; -We're thrilled that you're interested in contributing to `html2rss`! There are many ways to get involved, and we welcome contributions of all kinds. +Contributions are welcome in configs, code, docs and instances. --- ## Code of Conduct -Before you begin, please read our [Code of Conduct](https://github.com/html2rss/.github/blob/main/CODE_OF_CONDUCT.md). We expect all contributors to adhere to this code to ensure that our community is a welcoming and inclusive space for everyone. +Read the [Code of Conduct](https://github.com/html2rss/.github/blob/main/CODE_OF_CONDUCT.md) before you contribute. All contributors follow it. --- ## How to Contribute -Here are the main ways you can contribute to the `html2rss` project: +Ways to contribute: -### 1. Create a Feed Config (Most Popular!) +### 1. Create a Feed Config -Are you missing an RSS feed for a website? You can create your own feed config and share it with the community. It's a great way to get started with `html2rss` and help other users. +If a site has no feed, write a config and share it in the Feed Directory. -**The easiest way to contribute:** +Steps on GitHub: 1. Go to [html2rss-configs on GitHub](https://github.com/html2rss/html2rss-configs) 2. Click "Fork" → "Add file" → Create `domain.com/name.yml` under `lib/html2rss/configs/` -3. Include top-level `directory.topics` (non-empty) from the controlled vocabulary (`tech`, `news`, `security`, `research`, … — see [Creating Custom Feeds](/creating-custom-feeds/#sharing-your-config)) +3. Include top-level `directory.topics` (non-empty) from the controlled vocabulary (`tech`, `news`, `security`, `research`, … — see [Creating Custom Feeds](/creating-custom-feeds/#contribute-to-the-feed-directory)) 4. Prefer setting `channel.language` when the page language is clear 5. Paste your config → "Commit new file" → "Open pull request" -**Need help writing configs?** Start from [Capturing Feed Configs](/ruby-gem/guides/capturing-feed-configs/) or the [Creating Custom Feeds](/creating-custom-feeds/) guide. +**Need help writing a config?** Start from [Capturing Feed Configs](/ruby-gem/guides/capturing-feed-configs/) or the [Creating Custom Feeds](/creating-custom-feeds/) guide. -**Want to test your config first?** Use the [Ruby gem](/ruby-gem/installation/) to test it locally: +**Test the config first.** Install the [Ruby gem](/ruby-gem/installation/) and run: ### 2. Host a Public Instance -The [`html2rss-web`](https://github.com/html2rss/html2rss-web) project is a web application that provides RSS feeds with stable HTTPS URLs. You can host your own public instance to help other users access feeds. +[`html2rss-web`](https://github.com/html2rss/html2rss-web) serves feeds at stable URLs. You can run a public instance for other people. [**Learn how to host a public instance**](/web-application/deployment/) ### 3. Improve the Website -This website is built with Astro and Starlight and is hosted on GitHub Pages. If you have any ideas for improving the documentation or the design, we'd love to hear from you. +This site uses Astro and Starlight and is hosted on GitHub Pages. Send documentation and design fixes as pull requests. [**Find the source code on GitHub**](https://github.com/html2rss/html2rss.github.io) ### 4. Improve the `html2rss` Engine -Are you a Ruby developer? You can help us improve the core `html2rss` gem. Whether you're fixing a bug, adding a new feature, or improving the documentation, your contributions are welcome. +Fix bugs and add features in the core `html2rss` gem. [**Check out the documentation for the `html2rss` Gem**](/ruby-gem/) @@ -63,7 +63,7 @@ Native speaker? `html2rss` reads page words like "read more" and "sponsored" in ### 6. Report Bugs & Discuss Features -If you've found a bug, please open an issue on the appropriate GitHub repository. For new feature ideas, we encourage you to start a discussion first. +Open an issue in the matching repository. For feature ideas, start a discussion first. **Report Bugs:** @@ -76,5 +76,3 @@ If you've found a bug, please open an issue on the appropriate GitHub repository - [**Start a New Discussion on GitHub**](https://github.com/orgs/html2rss/discussions) --- - -We appreciate your interest in contributing to `html2rss`! diff --git a/src/content/docs/get-involved/index.mdx b/src/content/docs/get-involved/index.mdx index 8ce15ee1..08689fc9 100644 --- a/src/content/docs/get-involved/index.mdx +++ b/src/content/docs/get-involved/index.mdx @@ -6,7 +6,7 @@ sidebar: order: 1 --- -`html2rss` is a community-driven project. Whether you are a user, a developer, or a self-hoster, there are many ways to get involved and help improve the project. +`html2rss` is a community project. You can help with configs, docs, code, instances and support. ## Quick Links @@ -19,19 +19,19 @@ sidebar: ### 1. Create and Share Feed Configs -The most popular way to help! If a site you love doesn't have an RSS feed, create a config for it and share it in the [Feed Directory](/feed-directory/). +If a site has no feed, create a config for it and share it in the [Feed Directory](/feed-directory/). [**Learn how to contribute configs**](/get-involved/contributing/) ### 2. Improve the Documentation or Website -Found a typo? Want to improve a guide? This website is open source and we welcome your pull requests. +This website is open source. Send pull requests for typos and guide changes. [**Documentation Source Code**](https://github.com/html2rss/html2rss.github.io) ### 3. Improve the Ruby Engine or Web App -If you are a Ruby developer, you can help improve the core logic or the web interface. +Improve the extraction engine or the web interface. - [**html2rss (Ruby Gem)**](https://github.com/html2rss/html2rss) - [**html2rss-web (Web App)**](https://github.com/html2rss/html2rss-web) @@ -40,14 +40,14 @@ If you are a Ruby developer, you can help improve the core logic or the web inte ### Host a Public Instance -Running a reliable deployment benefits everyone. If you have a stable instance, consider adding it to the [community instance list](https://github.com/html2rss/html2rss-web/wiki/Instances). +If you run a stable instance, add it to the [community instance list](https://github.com/html2rss/html2rss-web/wiki/Instances). ### Help Others -Join the [Discussions](https://github.com/orgs/html2rss/discussions) and help new users get their first feeds running. Your experience is valuable to others! +Answer questions in the [Discussions](https://github.com/orgs/html2rss/discussions). ## Support the Project -`html2rss` is made possible by the support of our community. If you find the project useful, please consider sponsoring development. +Sponsors fund development. -[**💖 Sponsor on GitHub**](https://github.com/sponsors/gildesmarais) +[**Sponsor on GitHub**](https://github.com/sponsors/gildesmarais) diff --git a/src/content/docs/getting-started.mdx b/src/content/docs/getting-started.mdx index 25e3dfb3..4a7a1250 100644 --- a/src/content/docs/getting-started.mdx +++ b/src/content/docs/getting-started.mdx @@ -37,6 +37,8 @@ That stack runs: - `AUTO_SOURCE_ENABLED=true` so URL-to-RSS works without YAML - demo access token `CHANGE_ME_ADMIN_TOKEN` +The quickstart runs in development mode with a placeholder access token. For production, use the [production compose file](/web-application/deployment/) and set `HTML2RSS_ACCESS_TOKEN`. + ## Step 2: Start diff --git a/src/content/docs/index.mdx b/src/content/docs/index.mdx index 5df1934a..81b61daf 100644 --- a/src/content/docs/index.mdx +++ b/src/content/docs/index.mdx @@ -1,9 +1,9 @@ --- title: "Turn any website into an RSS feed" -description: "Paste a page URL into html2rss-web, get RSS or JSON Feed. Auto-source, Feed Directory, and MCP for agents." +description: "Paste a page URL into html2rss-web and get an RSS or JSON Feed. Auto-source, Feed Directory and MCP for agents." --- -`html2rss` turns websites into stable RSS and JSON feeds. The recommended path is **html2rss-web**: paste a page URL, enter an access token, and subscribe to the generated feed. Auto-source (with the Botasaurus companion for JavaScript-heavy sites) handles extraction without hand-written selectors. +`html2rss` turns web pages into RSS or JSON Feed. The recommended path is `html2rss-web`: paste a page URL, enter an access token and subscribe to the feed. Auto-source extracts the items without hand-written selectors. The Botasaurus companion renders JavaScript-heavy pages. ## Start here diff --git a/src/content/docs/ruby-gem/guides/capturing-feed-configs.mdx b/src/content/docs/ruby-gem/guides/capturing-feed-configs.mdx index 9c825a6b..0a1723ea 100644 --- a/src/content/docs/ruby-gem/guides/capturing-feed-configs.mdx +++ b/src/content/docs/ruby-gem/guides/capturing-feed-configs.mdx @@ -30,7 +30,7 @@ Print YAML to stdout: code={` html2rss capture https://example.com/articles # Hint the item card when auto detection is weak - html2rss capture https://example.com/articles --items_selector ".post-card" + html2rss capture https://example.com/articles --items-selector ".post-card" # Analyze a local HTML fixture html2rss capture https://example.com/articles --input ./page.html # Quality JSON on stderr; YAML stays on stdout @@ -44,7 +44,7 @@ Print YAML to stdout: Common options: - `--strategy` — request strategy override; defaults to `auto` (see [Strategy](/ruby-gem/reference/strategy/)) -- `--items_selector` — CSS selector hint for item cards +- `--items-selector` — CSS selector hint for item cards - `--limit` — maximum articles kept while deriving selectors (default `25`) - `--max-redirects` / `--max-requests` — request budget overrides - `--input` — local HTML file (sets `local_file` strategy) @@ -80,7 +80,7 @@ All options and result types: [Ruby API Reference](/ruby-gem/reference/ruby-api/ 4. **Gate** — emit an items selector only when enough articles match 5. **Assemble** — `{ items: { selector:, enhance: true } }` plus channel. Capture records the concrete strategy that produced the draft so `html2rss apply` / `Html2rss.feed` can reproduce that fetch path. -When the quality gate fails, selectors are omitted (`has_selectors: false`) rather than inventing attribute selectors. Hint with `--items_selector` or refine by hand. +When the quality gate fails, selectors are omitted (`has_selectors: false`) rather than inventing attribute selectors. Hint with `--items-selector` or refine by hand. ## What Capture Derives @@ -98,7 +98,7 @@ MCP `capture` returns that YAML in `payload.yaml`. `validate` / `apply` accept t 1. Validate: `html2rss validate my-feed.yml` 2. Render: `html2rss apply my-feed.yml` 3. Tighten the items selector if needed; keep `auto` unless diagnosis proves a fixed fetch mode is required -4. For Feed Directory contributions, add `directory.topics` and keep `enhance: true` unless chrome leaks (see [Creating Custom Feeds](/creating-custom-feeds/#sharing-your-config)) +4. For Feed Directory contributions, add `directory.topics` and keep `enhance: true` unless chrome leaks (see [Creating Custom Feeds](/creating-custom-feeds/#contribute-to-the-feed-directory)) ## Related diff --git a/src/content/docs/ruby-gem/index.mdx b/src/content/docs/ruby-gem/index.mdx index 74292922..d80ecbee 100644 --- a/src/content/docs/ruby-gem/index.mdx +++ b/src/content/docs/ruby-gem/index.mdx @@ -1,13 +1,13 @@ --- title: "Ruby Gem" -description: "Complete documentation for the html2rss Ruby gem. Create custom RSS feeds programmatically with full control over scraping and feed generation." +description: "Documentation for the html2rss Ruby gem: CLI, Ruby API, config reference and MCP server." sidebar: label: "Overview" --- -This section provides comprehensive documentation for the `html2rss` Ruby gem. +This section documents the `html2rss` Ruby gem. -If you are looking for the stable machine-readable contract for config authoring, use the JSON Schema exported by the core repo: +The JSON Schema is the machine-readable contract for configs: - Repository file: [**`html2rss-config.schema.json`**](https://github.com/html2rss/html2rss/blob/master/schema/html2rss-config.schema.json) - CLI export: `html2rss schema` (also `--write`, `--no-pretty`) @@ -18,7 +18,7 @@ The exported schema covers client-side validation. Runtime validation remains au ## Getting Started -If you are getting started with `html2rss`, we recommend starting with the [**first tutorial**](/ruby-gem/tutorials/your-first-feed/). +New to `html2rss`? Start with the [**first tutorial**](/ruby-gem/tutorials/your-first-feed/). ## Documentation Sections diff --git a/src/content/docs/ruby-gem/installation.mdx b/src/content/docs/ruby-gem/installation.mdx index 7e9edc33..2ab683d6 100644 --- a/src/content/docs/ruby-gem/installation.mdx +++ b/src/content/docs/ruby-gem/installation.mdx @@ -5,30 +5,30 @@ description: "Install the html2rss Ruby gem on your system. Choose from multiple import { Code } from "@astrojs/starlight/components"; -This guide will walk you through installing the html2rss Ruby gem on your system. Choose the method that works best for your setup - we'll walk you through each option step by step. +Install the html2rss Ruby gem with `gem install`, Bundler or GitHub Codespaces. --- ### Prerequisites -- **Ruby:** html2rss is built with Ruby. Ensure you have a compatible version of Ruby installed. You can check your Ruby version by running `ruby -v` in your terminal. If you don't have Ruby, visit [ruby-lang.org](https://www.ruby-lang.org/en/documentation/installation/) for installation instructions. -- **Bundler (Recommended):** Bundler is a Ruby gem that manages your application's dependencies. It's highly recommended for a smooth installation. Install it with `gem install bundler`. +- **Ruby:** version 3.3 or later. Check with `ruby -v`. To install Ruby, see [ruby-lang.org](https://www.ruby-lang.org/en/documentation/installation/). +- **Bundler (Recommended):** Manages your project's gems. Install it with `gem install bundler`. --- ### Method 1: Gem Installation (Recommended for CLI Usage) -The simplest way to get html2rss for command-line usage is to install it as a Ruby gem. +Install the gem to use the command line. -After installation, you should be able to run `html2rss --version` to confirm it's working. +Confirm with `html2rss --version`. --- ### Method 2: Using a Gemfile (For Ruby Projects) -If you're integrating html2rss into an existing Ruby project, add it to your `Gemfile`: +To use html2rss in a Ruby project, add it to your `Gemfile`: -You should see the installed version number. If you encounter any issues, please refer to the [Troubleshooting Guide](/troubleshooting/troubleshooting/). +The command prints the installed version. If it fails, see [Troubleshooting](/troubleshooting/troubleshooting/). --- ### Next Steps -Now that html2rss is installed, let's create your [first RSS feed](/ruby-gem/tutorials/your-first-feed/)! +Create your [first feed](/ruby-gem/tutorials/your-first-feed/). diff --git a/src/content/docs/ruby-gem/reference/auto-source.mdx b/src/content/docs/ruby-gem/reference/auto-source.mdx index eb8ec5c5..82f491db 100644 --- a/src/content/docs/ruby-gem/reference/auto-source.mdx +++ b/src/content/docs/ruby-gem/reference/auto-source.mdx @@ -1,11 +1,11 @@ --- title: Auto Source -description: "Learn about the auto_source scraper that automatically finds items on a page. No CSS selectors needed - html2rss intelligently detects content." +description: "The auto_source scraper finds items on a page without CSS selectors." --- import { Code } from "@astrojs/starlight/components"; -The `auto_source` scraper automatically finds items on a page, so you don't have to specify CSS selectors. +The `auto_source` scraper finds items on a page. You write no CSS selectors. To enable it, add `auto_source: {}` to your configuration: diff --git a/src/content/docs/ruby-gem/reference/cli-reference.mdx b/src/content/docs/ruby-gem/reference/cli-reference.mdx index d35f530d..db1c082a 100644 --- a/src/content/docs/ruby-gem/reference/cli-reference.mdx +++ b/src/content/docs/ruby-gem/reference/cli-reference.mdx @@ -1,15 +1,13 @@ --- title: CLI Reference -description: Complete reference for the html2rss command-line interface +description: Commands, options and exit codes of the html2rss command-line interface --- import { Code } from "@astrojs/starlight/components"; -This page documents the `html2rss` command-line interface (CLI). +Commands, options and exit codes of the `html2rss` CLI. For the Ruby API, see the YARD documentation. -For detailed documentation on the Ruby API, please refer to the official YARD documentation. - -[**📚 View the Ruby API Docs on rubydoc.info**](https://www.rubydoc.info/gems/html2rss) +[**Ruby API docs on rubydoc.info**](https://www.rubydoc.info/gems/html2rss) ## Commands @@ -258,6 +256,7 @@ Available options: - `--max-redirects`: Maximum redirects to follow per request. - `--max-requests`: Maximum requests to allow for this feed build. Without it, the budget is derived from the pipeline (page and pager, auto-source, entry resolution, fallback) and capped at `10`; a default auto-source run ends at `10`. - `--input`: Local HTML file path to read input from without making network requests. When provided without a `URL`, `html2rss` attempts to detect the base URL from `` or OpenGraph metadata in the HTML. +- `--resolution-scope`: `section` (default) or `site`. Sets how far entry resolution may leave the requested URL. - `--keep-different-domain`: Let published items link to any domain the source supplies. Off by default; there is no affiliation or safety check when on. - `--keep-sponsored`: Keep items the page marks as sponsored (`rel="sponsored"` or ad labels). Off by default. - `--explain`: Print status JSON to stderr (`version`, `dedup_dropped`, and when present `scraper_tallies`, `selected_strategy`, `attempt_count`, `strategy_attempts`, `admission_drops`, `entry_url`, `scrape_url`, `entry_resolution`). Stdout stays the RSS or JSON Feed. @@ -294,7 +293,7 @@ Known anti-bot interstitial responses (for example Cloudflare challenge pages) a If `auto` exhausts the available fetch paths without items, html2rss raises: -- `No RSS feed items extracted after auto fallback ...` +- `No feed items extracted after auto fallback across strategies: ...` If failures continue after URL/surface fixes, ensure `BOTASAURUS_SCRAPER_URL` is set so `auto` can use the companion scraper. diff --git a/src/content/docs/ruby-gem/reference/mcp-server.mdx b/src/content/docs/ruby-gem/reference/mcp-server.mdx index 4b697eb6..120184fa 100644 --- a/src/content/docs/ruby-gem/reference/mcp-server.mdx +++ b/src/content/docs/ruby-gem/reference/mcp-server.mdx @@ -54,7 +54,7 @@ Every tool returns one JSON object in text content and `structuredContent`: When a result was built from cached pages, the envelope also carries `cache: { hits, max_age_seconds }`. See [Response cache](#response-cache). -`next_step` is one of: `done`, `inspect`, `recon`, `validate`, `apply`, `scrape`, `capture`, `read_runtime`, `test`. +`next_step` is one of: `done`, `inspect`, `recon`, `validate`, `apply`, `scrape`, `capture`, `read_runtime`, `test`, `stop`. On `stop`, do not call another tool. ## Tools (7 bare verbs + batch trio) @@ -64,7 +64,7 @@ Golden path for durable YAML: `inspect` (optional) → `recon` → `capture` → One-shot article extraction as JSON Feed items (no saved config). -- **Parameters:** `url` (required); `strategy` (`auto` / `default` / `botasaurus`, default `auto`); `limit` (default `25`); optional `items_selector` +- **Parameters:** `url` (required); `strategy` (`auto` / `default` / `botasaurus`, default `auto`); `limit` (default `25`); optional `items_selector`; optional `resolution_scope` (`section` by default, or `site`), which sets how far entry resolution may leave the requested URL - **Payload:** `items`, plus totals / strategy fields when present - Empty items can still be `ok: true` — follow `next_step` / `guidance` @@ -86,7 +86,7 @@ Curation verdict and `native_feed` preference (`BUILD` / `DEFER` / `DROP`). Derive a reusable YAML draft (`payload.yaml`). Same serializer as CLI `html2rss capture`. Catalog feeds still need `directory.topics` and explicit channel `title` / `url`. - **Parameters:** `url` (required); `strategy`; `items_selector`; `force` (skip native feed detection); `topics` (array of directory topics); `title`; `summary`; `enhance` (force on or off); `limit`; `max_redirects`; `max_requests` -- Typical `next_step`: `test` or `inspect` +- Typical `next_step`: `test` (selectors found), `scrape` (no selectors), `done` (native feed) or `stop` (no articles) ### `validate` @@ -110,7 +110,7 @@ Schema validation plus live extraction. Ship gate: build RSS from a config. Required `url` plus exactly one of `config` or `yaml`. - **Payload:** `rss`, `item_count`, `quality_report` -- `isError` when zero items; `next_step` is then `inspect` +- `isError` when zero items; `next_step` is then `stop` - A missing `channel.url` is filled from `url` ### Batch trio @@ -121,7 +121,7 @@ Ship gate: build RSS from a config. Required `url` plus exactly one of `config` | `batch_inspect` | Parallel inspect | | `batch_recon` | Parallel recon | -All three take `urls` (1 to 25), `strategy` and `concurrency` (worker threads, `1..10`, default `5`). `batch_scrape` also takes `limit` (default `10` per URL). +All three take `urls` (1 to 25), `strategy` and `concurrency` (worker threads, `1..10`, default `5`). `batch_scrape` also takes `limit` (default `10` per URL) and `resolution_scope`. ## Resources @@ -130,7 +130,7 @@ All three take `urls` (1 to 25), `strategy` and `concurrency` (worker threads, ` | `html2rss://schema` | Feed config JSON Schema | | `html2rss://extractors` | Extractor names | | `html2rss://strategies` | Published strategy names: `auto`, `default`, `httpx`, `botasaurus`; prefer `auto` | -| `html2rss://runtime` | `version`, `mcp_contract_version` (currently `4`), `catalog_fingerprint`, `tools`, `botasaurus_configured`, `response_cache_ttl` (`null` when off) — never the scraper URL | +| `html2rss://runtime` | `version`, `mcp_contract_version` (currently `6`), `catalog_fingerprint`, `tools`, `botasaurus_configured`, `response_cache_ttl` (`null` when off) — never the scraper URL | `validate` / `apply` reject `strategy: local_file` and `request.local_file_path`. Use CLI `--input` for fixtures. diff --git a/src/content/docs/ruby-gem/tutorials/your-first-feed.mdx b/src/content/docs/ruby-gem/tutorials/your-first-feed.mdx index bf47b0ab..5153860c 100644 --- a/src/content/docs/ruby-gem/tutorials/your-first-feed.mdx +++ b/src/content/docs/ruby-gem/tutorials/your-first-feed.mdx @@ -1,33 +1,31 @@ --- title: "Your First Feed" -description: "Welcome to html2rss! This guide will walk you through creating your first RSS feed." +description: "Create your first feed with html2rss: first from a URL, then from a YAML config." --- import { Code } from "@astrojs/starlight/components"; -Welcome to `html2rss`! This guide will walk you through creating your first RSS feed. We'll start with the easiest method and gradually introduce more powerful options. +Create a feed from a URL, then from a YAML config. You need the [installed gem](/ruby-gem/installation/). --- -## Step 1: The "No-Config" Method (`auto`) +## Step 1: Scrape a URL -The easiest way to create a feed is with the `auto` command. It requires no configuration file and intelligently scrapes the page to find content. +`html2rss scrape` needs no config file. It finds the items on the page. -Open your terminal and run this command: +Run: -`html2rss` will analyze the website and generate an RSS feed for you, printing it directly to the console. This is a great way to see if `html2rss` can automatically handle your target website. +The command prints the RSS feed to stdout. Use it to check whether html2rss can read your target site. -**Is the result not quite right?** Let's move to the next step. +If the result is wrong, write a config. --- -## Step 2: The "Full Control" Method (`selectors`) +## Step 2: Write a config -When you need to extract content with precision, the `selectors` scraper is the tool for the job. This method gives you complete control over what content is included in your feed by using CSS selectors. - -Let's create a feed for a simple article listing page. +A config uses CSS selectors to pick each part of an item. This example reads a simple article listing page. 1. **Create a file** named `example.yml`. 2. **Add the following content:** @@ -50,7 +48,7 @@ Let's create a feed for a simple article listing page. lang="yaml" /> -3. **Run the `feed` command:** +3. **Run `apply`:** @@ -61,4 +59,4 @@ This configuration tells `html2rss`: - The `url` is read from that link's `href`. - The `description` comes from the `.summary` element inside each card. -This is just the beginning! From here, you can dive deep into the full range of [configuration options](/ruby-gem/reference/) to create the perfect feed. +For all options, see the [reference](/ruby-gem/reference/). diff --git a/src/content/docs/troubleshooting/troubleshooting.mdx b/src/content/docs/troubleshooting/troubleshooting.mdx index a65e3b95..95363d42 100644 --- a/src/content/docs/troubleshooting/troubleshooting.mdx +++ b/src/content/docs/troubleshooting/troubleshooting.mdx @@ -1,17 +1,15 @@ --- title: "Troubleshooting" -description: "This guide provides solutions to common issues encountered when using html2rss." +description: "Fixes for common html2rss problems in the gem, the CLI and html2rss-web." --- import { Code } from "@astrojs/starlight/components"; -This guide provides solutions to common issues encountered when using `html2rss`. +Fixes for common problems with the gem, the CLI and `html2rss-web`. -## Essential Tools +## Browser developer tools -Your browser's developer tools are essential for troubleshooting. Use them to inspect the HTML structure of a webpage and find the correct CSS selectors. - -- **To open:** Right-click an element on a webpage and select "Inspect" or "Inspect Element." +Inspect the page HTML to find CSS selectors. Right-click an element and choose "Inspect". --- @@ -56,7 +54,7 @@ If your feed is empty, check the following: Known anti-bot interstitial patterns (for example Cloudflare or DataDome challenge pages) are surfaced as blocked-surface errors instead of silent empty extraction results. -When `auto` exhausts the available fetch paths without items, html2rss raises `No RSS feed items extracted after auto fallback ...`. +When `auto` exhausts the available fetch paths without items, html2rss raises `No feed items extracted after auto fallback across strategies: ...`. If failures continue after URL/surface fixes, configure `BOTASAURUS_SCRAPER_URL` so `auto` can use the companion scraper. Pin `--strategy botasaurus` only for browser-specific diagnosis or controls. diff --git a/src/content/docs/web-application/concepts.mdx b/src/content/docs/web-application/concepts.mdx index 18e8d282..937d44a6 100644 --- a/src/content/docs/web-application/concepts.mdx +++ b/src/content/docs/web-application/concepts.mdx @@ -17,11 +17,11 @@ Production Docker Compose defaults `AUTO_SOURCE_ENABLED` to `true`. Non-compose ## Three tokens (plain English) -| Variable | Role | -| ----------------------- | ----------------------------------------------------------------------------------------------- | -| `HTML2RSS_SECRET_KEY` | Encrypts session cookies and signed state (≥ 32 characters). Required in production. | -| `HTML2RSS_ACCESS_TOKEN` | What users paste into the UI to create feeds (≥ 16 characters). Required by production Compose. | -| `HEALTH_CHECK_TOKEN` | Optional. Gates authenticated `GET /api/v1/health` when you want a private probe. | +| Variable | Role | +| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `HTML2RSS_SECRET_KEY` | Encrypts session cookies and signed state (≥ 32 characters). Required in production. | +| `HTML2RSS_ACCESS_TOKEN` | Gates feed creation and the API; paste it into the UI (≥ 16 characters). It does not gate `/.rss` feeds from `feeds.yml`. Required by production Compose. | +| `HEALTH_CHECK_TOKEN` | Optional. Gates authenticated `GET /api/v1/health` when you want a private probe. | Generate secrets with `openssl rand -hex 32`. Demo quickstart hard-codes `CHANGE_ME_ADMIN_TOKEN` as the access token — replace it before any shared or public host. @@ -37,7 +37,7 @@ Plain HTTP works on localhost and LAN. The app sets HSTS and CSP `upgrade-insecu | -------------------- | ---------------------------------------------------------------------------------- | | **html2rss-web** | Web UI, API, feed URLs, Feed Directory catalog API | | **html2rss** (gem) | Extraction engine, CLI (`scrape` / `apply`), MCP server | -| **html2rss-configs** | Curated YAML under `lib/html2rss/configs/`; signed registry bundles | +| **html2rss-configs** | Curated YAML under `lib/html2rss/configs/` | | **Feed Directory** | Browse UI on the docs site; loads entries from your instance `GET /api/v1/configs` | ## Where next diff --git a/src/content/docs/web-application/deployment.mdx b/src/content/docs/web-application/deployment.mdx index d32230dd..02fc4a30 100644 --- a/src/content/docs/web-application/deployment.mdx +++ b/src/content/docs/web-application/deployment.mdx @@ -50,7 +50,7 @@ Use image tag `html2rss/web:1` (or pin an exact release). Production Compose liv Web listens on host port **4000** (`4000:4000`). Botasaurus stays on `127.0.0.1:4010` inside the published mapping from Compose. Open `http://localhost:4000/` or `http://:4000/` and paste `HTML2RSS_ACCESS_TOKEN`. -Port `4000` on all interfaces is intentional for LAN access. Protect the instance with a strong access token; do not expose an unauthenticated demo token on a shared network. +Port `4000` on all interfaces is intentional for LAN access. The access token gates feed creation and the API. Feeds from your `feeds.yml` and the Feed Directory catalog are served at `/.rss` without a token. Use a strong access token, and do not use the demo token on a shared network. ## LAN / Tailscale (plain HTTP) @@ -81,7 +81,7 @@ After `docker compose up -d`, check `docker compose logs caddy --tail 20` for ce ## Custom feeds mount -Auto-source is the default. To add curated YAML feeds, bind-mount `feeds.yml` (see [Advanced Feeds](/creating-custom-feeds/)): +Auto-source is the default. To add your own YAML feeds, bind-mount `feeds.yml`. The file defines each feed under `feeds:` and serves it at `/.rss`. Your file replaces the shipped one, including its `auth.accounts` block, and the container reads it at startup, so restart after edits. Details: [Advanced Feeds](/creating-custom-feeds/). -### Using installed Ruby +`make dev` starts two servers: + +- `http://127.0.0.1:4000`: the API only, including `/api/v1`. +- `http://127.0.0.1:4001`: the frontend. Open this one in the browser. + +On Linux, run `export DEV_UID=$(id -u) DEV_GID=$(id -g)` before `make setup`. -If you're comfortable with installing Ruby directly on your machine, follow these instructions: +## Checks -1. Install Ruby `>= 3.2` -2. `gem install bundler foreman` -3. `bundle` -4. `foreman start` +| Command | Purpose | +| ------------ | ------------------------------------------------------------- | +| `make ready` | Pre-commit gate: quick checks plus the Ruby specs. | +| `make test` | Ruby and frontend tests. | +| `make lint` | All linters. | +| `make reset` | Drop the dev volumes when a `Gemfile.lock` change misbehaves. | -_html2rss-web_ now listens on port **3000** for requests. +The [contributor guide](https://github.com/html2rss/html2rss-web/blob/main/docs/README.md) lists the remaining targets, including the OpenAPI workflow. diff --git a/src/content/docs/web-application/guides/use-automatic-feed-generation.mdx b/src/content/docs/web-application/guides/use-automatic-feed-generation.mdx index 444e7a8c..3410c26c 100644 --- a/src/content/docs/web-application/guides/use-automatic-feed-generation.mdx +++ b/src/content/docs/web-application/guides/use-automatic-feed-generation.mdx @@ -5,21 +5,21 @@ description: "Understand how the token-gated web UI flow creates a stable feed f import { Code } from "@astrojs/starlight/components"; -Automatic feed generation lets `html2rss-web` create a stable feed from just a page's URL without you writing any YAML configs. It uses heuristics to find the main content list on a page. +Paste a page URL and `html2rss-web` creates a feed. You write no YAML. Heuristics find the main item list on the page. ## How it Works -This flow depends on three components working together: +The flow needs three parts: -1. **The Server:** `AUTO_SOURCE_ENABLED=true` (default in development) must be set. +1. **The server:** `AUTO_SOURCE_ENABLED=true`. The shipped compose files set it. 2. **Access Control:** The server expects `HTML2RSS_ACCESS_TOKEN`. -3. **The Web UI:** You provide the URL and the token in the browser. +3. **The web UI:** you enter the URL and the token in the browser. -When you click "Generate," the server parses the page, identifies the items, and generates a unique, stable URL for that feed. +The server parses the page, finds the items and returns a stable feed URL. ## Input Quality Tips -Automatic generation is most successful when the input URL is a dedicated listing page. +Use a dedicated listing page as the input URL. - **Prefer:** Newsrooms, press releases, changelogs, or category archives. - **Avoid:** Generic homepages, search results, or sites that require heavy JavaScript to show content. @@ -28,7 +28,7 @@ If a generated feed's quality is poor, try a more specific sub-page URL before s ## When to Switch to Custom Feeds -While automatic generation is fast, it is not a "set and forget" solution for complex sites. Move to [Creating Custom Feeds](/creating-custom-feeds/) when: +Use [Creating Custom Feeds](/creating-custom-feeds/) when: - You need to extract specific fields (like custom tags or authors). - The heuristic picks the wrong content area. diff --git a/src/content/docs/web-application/reference/env-variables.mdx b/src/content/docs/web-application/reference/env-variables.mdx index 82c9712d..bd90e958 100644 --- a/src/content/docs/web-application/reference/env-variables.mdx +++ b/src/content/docs/web-application/reference/env-variables.mdx @@ -5,31 +5,34 @@ description: "Configuration reference for html2rss-web environment variables." ## Supported ENV variables -| Name | Description | -| ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `HTML2RSS_SECRET_KEY` | required in production; development/test gets a temporary default | -| `HTML2RSS_ACCESS_TOKEN` | token for the main feed-creation flow; paste the same value into the web UI when prompted | -| `HEALTH_CHECK_TOKEN` | optional bearer token for authenticated `GET /api/v1/health`; not part of the first-run quickstart; use `/api/v1/health/ready` for standard readiness checks | -| `BUILD_TAG` | release metadata used in logs; published Docker images set this to the release version | -| `GIT_SHA` | deployed commit metadata used in logs; published Docker images set this to the released commit | -| `SENTRY_DSN` | optional; enables Sentry errors/logs when set | -| `BOTASAURUS_SCRAPER_URL` | optional; Botasaurus scrape API base URL (e.g. `http://botasaurus:4010`) for browser rendering and anti-bot bypass | -| `AUTO_SOURCE_ENABLED` | `true` by default in development/test, `false` otherwise | -| `ASYNC_FEED_REFRESH_ENABLED` | optional boolean; default `false` | -| `ASYNC_FEED_REFRESH_STALE_FACTOR` | optional integer `>= 1`; default `3` | -| `FEEDS_CACHE_MAX_SIZE` | optional integer `>= 1`; default `500`; maximum number of feeds to cache in memory before eviction | -| `RATE_LIMIT_ENABLED` | optional boolean; default `true` (except `false` in `test`); enables or disables client IP rate limiting | -| `RATE_LIMIT_MAX_REQUESTS` | optional integer `>= 1`; default `60`; maximum requests allowed per IP per window | -| `RATE_LIMIT_WINDOW_SECONDS` | optional integer `>= 1`; default `60`; rate limiter sliding window duration in seconds | -| `RETRY_AFTER_TIMEOUT_SECONDS` | optional integer `>= 1`; default `300`; Retry-After header backoff duration returned on timeouts | -| `PORT` | app listen port; compose uses `4000` | -| `RACK_ENV` | Rack environment; quickstart uses `development`, production examples use `production` | -| `REQUEST_TIMEOUT_SECONDS` | optional; total web-request timeout in seconds; default `55` | -| `WEB_CONCURRENCY` | optional integer `>= 1`; default `2` in production (`1` in development); number of web worker processes | -| `BOTASAURUS_SCRAPE_TIMEOUT_SECONDS` | optional; HTTP client cap for POST `/scrape` in seconds; default `45`; mirrors `SCRAPE_TIMEOUT_SECONDS` on botasaurus-scrape-api | -| `BOTASAURUS_SCRAPE_WORK_TIMEOUT_SECONDS` | optional; maximum `wait_timeout_seconds` in feed YAML; default `30`; mirrors `SCRAPE_WORK_TIMEOUT_SECONDS` on botasaurus-scrape-api | -| `SCRAPE_WORK_TIMEOUT_SECONDS` | optional on botasaurus-scrape-api; post-boot navigate, selector wait, and scroll budget in seconds; default `30`; set on the scraper service in compose | -| `HTML2RSS_TOTAL_TIMEOUT_SECONDS` | optional; internal gem feed-build timeout in seconds; default `50` | +| Name | Description | +| ---------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `HTML2RSS_SECRET_KEY` | required in production; development/test gets a temporary default | +| `HTML2RSS_ACCESS_TOKEN` | token for the main feed-creation flow; paste the same value into the web UI when prompted | +| `HEALTH_CHECK_TOKEN` | optional bearer token for authenticated `GET /api/v1/health`; not part of the first-run quickstart; use `/api/v1/health/ready` for standard readiness checks | +| `BUILD_TAG` | release metadata used in logs; published Docker images set this to the release version | +| `GIT_SHA` | deployed commit metadata used in logs; published Docker images set this to the released commit | +| `SENTRY_DSN` | optional; enables Sentry errors/logs when set | +| `BOTASAURUS_SCRAPER_URL` | optional; Botasaurus scrape API base URL (e.g. `http://botasaurus:4010`) for browser rendering and anti-bot bypass | +| `AUTO_SOURCE_ENABLED` | boolean. The app default is `true` in development/test and `false` otherwise. The shipped `docker-compose.yml` (default `true`) and `docker-compose.quickstart.yml` (`true`) both enable it. | +| `CONFIG_CATALOG_ENABLED` | optional boolean; default `true`. When `false`, `GET /api/v1/configs` returns `404` with `catalog_disabled`. | +| `BOTASAURUS_SENTRY_DSN` | optional; read by the production compose file and passed to the botasaurus service as its own `SENTRY_DSN`. Use a separate project from `SENTRY_DSN`. | +| `TLS_CERTIFICATE_PATH` / `TLS_KEY_PATH` | optional; certificate and private key paths for TLS termination inside the app. Without them, terminate TLS in a reverse proxy. | +| `ASYNC_FEED_REFRESH_ENABLED` | optional boolean; default `false` | +| `ASYNC_FEED_REFRESH_STALE_FACTOR` | optional integer `>= 1`; default `3` | +| `FEEDS_CACHE_MAX_SIZE` | optional integer `>= 1`; default `500`; maximum number of feeds to cache in memory before eviction | +| `RATE_LIMIT_ENABLED` | optional boolean; default `true` (except `false` in `test`); enables or disables client IP rate limiting | +| `RATE_LIMIT_MAX_REQUESTS` | optional integer `>= 1`; default `60`; maximum requests allowed per IP per window | +| `RATE_LIMIT_WINDOW_SECONDS` | optional integer `>= 1`; default `60`; rate limiter sliding window duration in seconds | +| `RETRY_AFTER_TIMEOUT_SECONDS` | optional integer `>= 1`; default `300`; Retry-After header backoff duration returned on timeouts | +| `PORT` | app listen port; compose uses `4000` | +| `RACK_ENV` | Rack environment; quickstart uses `development`, production examples use `production` | +| `REQUEST_TIMEOUT_SECONDS` | optional; total web-request timeout in seconds; default `55` | +| `WEB_CONCURRENCY` | optional integer `>= 1`; default `2` in production (`1` in development); number of web worker processes | +| `BOTASAURUS_SCRAPE_TIMEOUT_SECONDS` | optional; HTTP client cap for POST `/scrape` in seconds; default `45`; mirrors `SCRAPE_TIMEOUT_SECONDS` on botasaurus-scrape-api | +| `BOTASAURUS_SCRAPE_WORK_TIMEOUT_SECONDS` | optional; maximum `wait_timeout_seconds` in feed YAML; default `30`; mirrors `SCRAPE_WORK_TIMEOUT_SECONDS` on botasaurus-scrape-api | +| `SCRAPE_WORK_TIMEOUT_SECONDS` | optional on botasaurus-scrape-api; post-boot navigate, selector wait, and scroll budget in seconds; default `30`; set on the scraper service in compose | +| `HTML2RSS_TOTAL_TIMEOUT_SECONDS` | optional; internal gem feed-build timeout in seconds; default `50` | ## Timeout Chain diff --git a/src/content/docs/web-application/reference/monitoring.mdx b/src/content/docs/web-application/reference/monitoring.mdx index ebb0195c..9a5688cf 100644 --- a/src/content/docs/web-application/reference/monitoring.mdx +++ b/src/content/docs/web-application/reference/monitoring.mdx @@ -23,11 +23,11 @@ Set `HEALTH_CHECK_TOKEN`, then call the authenticated endpoint: lang="bash" /> -The response is JSON with status, timestamp, environment, uptime, and a checks payload. Boot fails in production if `HEALTH_CHECK_TOKEN` is still `CHANGE_ME_HEALTH_CHECK_TOKEN` after the hardening release. +The response is JSON with status, timestamp, environment, uptime, and a checks payload. Boot fails in production if `HEALTH_CHECK_TOKEN` is blank or still `CHANGE_ME_HEALTH_CHECK_TOKEN`. ## Sentry -Set `SENTRY_DSN` to enable Issue capture in html2rss-web (Rack middleware and operational failures). Structured log intake is opt-in: set `SENTRY_ENABLE_LOGS=true` explicitly — a DSN alone does not forward stdout logs. +Set `SENTRY_DSN` to enable Issue capture in html2rss-web (Rack middleware and operational failures). Use separate Sentry projects for html2rss-web and botasaurus-scrape-api. Never share a DSN.