Skip to content

Commit 53d89f1

Browse files
authored
feat(feed-directory): load catalog from instance API (#1240)
* feat(feed-directory): load catalog from instance API * chore: drop unused Ruby toolchain from docs site Remove Gemfile, lockfile, and RuboCop config now that the feed directory is npm-only, and simplify CI/dependabot accordingly.
1 parent 7de0ecd commit 53d89f1

19 files changed

Lines changed: 494 additions & 3099 deletions

.github/dependabot.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
11
version: 2
22
updates:
3-
- package-ecosystem: bundler
4-
directory: "/"
5-
schedule:
6-
interval: weekly
7-
open-pull-requests-limit: 10
8-
allow:
9-
- dependency-type: direct
10-
- dependency-type: indirect
11-
groups:
12-
ruby:
13-
patterns:
14-
- "*"
153
- package-ecosystem: "npm"
164
directory: "/"
175
schedule:

.github/workflows/gh-pages.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,6 @@ jobs:
2424
node-version: "22"
2525
cache: "npm"
2626

27-
- name: Set up Ruby
28-
uses: ruby/setup-ruby@v1
29-
with:
30-
ruby-version: 3.4
31-
bundler-cache: true
32-
3327
- name: Install dependencies
3428
run: npm ci
3529

.rubocop.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.

AGENTS.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,13 @@ What this repo owns:
99

1010
- docs content and navigation under `src/content/docs/`
1111
- docs-specific components and styling under `src/components/`
12-
- feed-directory presentation and client behavior
13-
- generated docs data consumed by the site (`src/data/configs.json`)
12+
- feed-directory presentation and client behavior (`FeedDirectory.astro`, `feed-directory.js`)
1413

1514
What this repo does not own:
1615

1716
- runtime extractor behavior and CLI semantics (`html2rss/`)
18-
- web API behavior and OpenAPI generation (`html2rss-web/`)
19-
- feed YAML catalog definitions (`html2rss-configs/`)
17+
- catalog metadata, YAML configs, or catalog serialization (`html2rss-configs/``Html2rss::Configs::Catalog`)
18+
- catalog HTTP API (`html2rss-web/``GET /api/v1/configs`)
2019

2120
When docs describe behavior from other repos, treat those repos as source-of-truth and update docs to match them.
2221

@@ -30,40 +29,41 @@ Before substantial edits, state cross-repo context in your notes:
3029

3130
Common contracts:
3231

33-
- Feed directory data comes from `html2rss-configs` via `bin/data-update`.
32+
- Feed Directory browse data comes from `{instance}/api/v1/configs` on a running `html2rss-web` instance (see OpenAPI in `html2rss-web`).
33+
- Instance URL persistence: default public instance, `#!url=` hash deep link from the web app, and browser localStorage (see `feed-directory.js`).
34+
- Deep link from `html2rss-web`: `https://html2rss.github.io/feed-directory/#!url={encodedInstanceUrl}` must keep working.
35+
- Catalog metadata in YAML (`directory.title`, `directory.summary`, `directory.topics`) is authored in `html2rss-configs` only.
3436
- Ruby gem docs should match `html2rss` behavior and CLI output.
3537
- Web application docs should match `html2rss-web` behavior and published OpenAPI.
3638

3739
If a cross-repo behavior changed but upstream is not updated yet, document the gap clearly instead of inventing new behavior.
3840

39-
## Generated Artifacts
41+
## Feed Directory (agent maintenance)
4042

41-
Treat `src/data/configs.json` as generated.
43+
- The browse UI is a **thin client**: fetch catalog JSON from the active instance, render rows client-side, build RSS links from each entry's `path`.
44+
- Do not reintroduce `bin/data-update`, `src/data/configs.json`, or a `html2rss-configs` gem dependency in this repo.
45+
- Wire shape v1 is defined in `html2rss-web` request specs and OpenAPI (`catalog_version`, `parameters.schema`, `parameters.defaults`).
46+
- When the instance is unreachable or returns `404` with `catalog_disabled`, show an error state — no static fallback list.
4247

43-
- Do not hand-edit it.
44-
- Regenerate with repo-native commands:
45-
- `make update`
46-
- or `bin/data-update` (after dependencies are installed)
47-
- `bin/data-update` reads packaged configs (from `html2rss-configs`) and writes `src/data/configs.json`.
48+
## Generated Artifacts
4849

49-
If a change only affects generated data, include the source change rationale in the PR description.
50+
This repo has no generated catalog data. Do not add a packaged-config snapshot back into the docs build.
5051

5152
## Build, Test, and Dev Commands
5253

5354
Run commands from `html2rss.github.io/`:
5455

55-
- `make setup` installs dependencies and refreshes generated data
56+
- `make setup` installs npm dependencies
5657
- `make dev` runs Astro locally
5758
- `make build` builds production output
5859
- `make lint` checks formatting
5960
- `make lintfix` applies formatting fixes
60-
- `make update` refreshes feed-directory data from packaged configs
6161

6262
Preferred verification flow for docs/content changes:
6363

6464
1. Run targeted check(s) first (`make lint` or `make build`).
6565
2. Run the broader check set before PR (`make lint` and `make build`).
66-
3. If feed directory or config references changed, run `make update` and verify resulting diffs.
66+
3. For feed-directory UI changes, spot-check against a running instance with catalog enabled (`GET /api/v1/configs` returns entries).
6767

6868
## Docs Authoring Rules
6969

Gemfile

Lines changed: 0 additions & 6 deletions
This file was deleted.

Gemfile.lock

Lines changed: 0 additions & 140 deletions
This file was deleted.

Makefile

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
default: setup clean lintfix dev
1+
default: setup lint dev
22

33
setup:
44
npm ci
5-
bundle check || bundle
6-
make update
75

86
dev:
97
npm run dev
@@ -26,7 +24,3 @@ lintfix:
2624
clean:
2725
find . -type d -empty -delete
2826
find . -type f -empty -delete
29-
30-
update:
31-
bundle update html2rss-configs
32-
bin/data-update

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,35 +8,34 @@ website.
88
### Prerequisites
99

1010
- Node.js (for Astro)
11-
- Ruby (for data updates)
1211

1312
### Quick Setup
1413

1514
```bash
16-
# Install dependencies and refresh generated feed data
15+
# Install dependencies
1716
make setup
1817

1918
# Start the local Astro development server
2019
make dev
2120
```
2221

22+
Feed Directory browse data comes from a running `html2rss-web` instance (`GET /api/v1/configs`). For local feed-directory testing, run an instance (for example from `html2rss-web`) and point the directory UI at it.
23+
2324
### 💻 Try in Browser
2425

2526
You can develop html2rss directly in your browser using GitHub Codespaces:
2627

2728
[Open in GitHub Codespaces](https://github.com/codespaces/new?repo=html2rss/html2rss.github.io)
2829

29-
The Codespace provides a cloud development environment with Node.js and Ruby pre-installed. Run `make setup` to install dependencies and get started!
30+
The Codespace provides a cloud development environment with Node.js pre-installed. Run `make setup` to install dependencies and get started!
3031

3132
### Available Commands
3233

33-
- `make setup` - Install dependencies and refresh generated feed data
34+
- `make setup` - Install npm dependencies
3435
- `make dev` - Start Astro development server
3536
- `make build` - Build for production
3637
- `make preview` - Preview production build
37-
- `make build-full` - Update data and build for production
3838
- `make lintfix` - Fix code formatting
39-
- `make update` - Update feed data
4039

4140
## 🌐 Community & Resources
4241

bin/data-update

Lines changed: 0 additions & 65 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
"build": "astro build",
99
"preview": "astro preview",
1010
"astro": "astro",
11-
"update-data": "ruby bin/data-update",
12-
"build:full": "npm run update-data && npm run build",
11+
"build:full": "npm run build",
1312
"lint": "prettier --check .",
1413
"lintfix": "prettier --write ."
1514
},

0 commit comments

Comments
 (0)