Skip to content

One class per site-wide OPML file - #50

Merged
pfefferle merged 4 commits into
mainfrom
refactor/site-files
Oct 15, 2026
Merged

pfefferle merged 4 commits into
mainfrom
refactor/site-files

Conversation

@pfefferle

Copy link
Copy Markdown
Owner

Opml was the page OPML, the discovery links, the feed namespace and every file of the whole site in one class. This gives each of those files a class of its own: Directory, Recommendations and Following. The templates share their head now.

Each of them answers to its own value of ?opml on any URL: ?opml=directory, ?opml=recommendations and ?opml=following. That also works with plain permalinks, where the well-known paths do not. Opml::FILES maps the values to the classes, and render() just asks the right class to serve().

The directory and the recommendations are the same file for now, Recommendations just calls Directory. With a class each they can go separate ways later.

The well-known rule of the recommendations points to opml=recommendations now. The stored rule no longer matches, so the check for stale rules flushes once after the update. Until then the old rule lands on opml=directory, which is the same file.

Opml::directory() and Opml::DIRECTORY are gone, nothing outside the plugin uses them as far as I can tell.

@pfefferle
pfefferle force-pushed the refactor/site-files branch from 034b244 to 1dc4f57 Compare October 15, 2026 11:55
@pfefferle
pfefferle merged commit d1d4b15 into main Oct 15, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant