Implements NewsletterProviderInterface for Substack, generating embed URLs and indicating iframe‑only integration.
// Source: https://github.com/mperkins0155/llms-txt-hub | License: MIT | Copyright 2025 David Dias
// Provided via justclaw.it.com; keep this notice with the code.
import type {
NewsletterProviderInterface,
NewsletterSubscriber,
SubscribeRequest,
SubscribeResponse,
SubstackConfig
} from '../types'
export class SubstackProvider implements NewsletterProviderInterface {
private config: SubstackConfig
constructor(config: SubstackConfig) {
this.config = config
if (!config.publicationUrl) {
throw new Error('Substack publication URL is required')
}
}
async subscribe(_data: SubscribeRequest): Promise<SubscribeResponse> {
// Substack doesn't have an API - it uses an embedded iframe
// This provider is mainly for configuration and generating the embed
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search 40K more like it.
Get a free API key