Plugin System
Extensible Content Sources
Not all content lives in standard RSS feeds. Research papers on ArXiv, posts on LessWrong, documents in Google Docs, and code on GitHub each have their own formats and APIs. Lion Reader’s plugin system provides a clean way to integrate with these platforms, so you can subscribe to feeds and save articles from them just like any other source.
Capability-Based Architecture
Each plugin declares the capabilities it supports:
- Feed capability — Transform URLs into feed URLs, clean entry content, and customize feed titles. This lets you subscribe to content sources that don’t expose standard RSS feeds.
- Saved article capability — Fetch and process content from URLs when saving articles (see the Save for Later article for all the ways to save). This lets you save content from platforms that require API access or special handling to extract clean text.
Plugins are registered by hostname for fast O(1) lookup. When Lion Reader encounters a URL, it checks the registry for a matching plugin and uses its capabilities. If no plugin matches, or the plugin returns null, standard processing takes over.
LessWrong
The LessWrong plugin supports both feed and saved article capabilities. For feeds, it transforms user profile URLs (like /users/eliezer_yudkowsky) into GraphQL-powered RSS feeds, cleans the “Published on…” prefix from entry content, and appends author display names to feed titles. For saved articles, it fetches full post and comment content directly through the LessWrong GraphQL API, producing clean HTML without needing Readability post-processing.
Google Docs
The Google Docs plugin provides saved article capability, letting you save Google Docs directly to Lion Reader. It extracts the document ID from the URL, fetches the content through the Google Docs API, and preserves formatting. The document title and author are extracted automatically, and the canonical URL is normalized for deduplication.
ArXiv
The ArXiv plugin handles saved articles from arxiv.org. It recognizes abstract, PDF, and HTML URLs, and prefers the HTML version when available for better readability. Unlike the LessWrong and Google Docs plugins, ArXiv content still goes through Readability for cleanup, since the HTML pages include navigation and other site chrome.
GitHub
The GitHub plugin is the most versatile, handling several types of GitHub content:
- Gists — Fetches gist content via the GitHub API and renders files with Markdown support
- Repository files — Fetches file content from
/blob/URLs, rendering Markdown files and falling back to Readability for others - Repository roots — Fetches the README from
github.com/owner/repoURLs, trying multiple filename variants - Raw content — Handles
raw.githubusercontent.comURLs for direct file access
The plugin uses GitHub API authentication when available for higher rate limits, and handles rate limiting and missing content gracefully.
Adding New Plugins
The plugin system is designed to be extensible. A new plugin needs to define its name, the hostnames it handles, a matchUrl function for more specific URL matching, and one or more capabilities. Once registered in the plugin registry, it automatically integrates with feed fetching and article saving across the entire application — including the web UI, MCP server, and Discord bot.