Back to .md Directory

feed-sources

Documents four built-in feed sources (Hacker News, TabNews, DEV.to, GitHub) and shows how to add custom JSON API fetchers.

May 2, 2026
0 downloads
1 views
ai
View source

What this file does

Documents four built-in feed sources (Hacker News, TabNews, DEV.to, GitHub) and shows how to add custom JSON API fetchers.

When to use it

  • You want to pull content from Hacker News, TabNews, DEV.to, or GitHub
  • You need to add a custom JSON API as a feed source
  • You are building a client-side feed reader and need CORS-compatible sources
  • You want to understand the configuration options for each built-in source

Assumes this stack

JavaScriptJSON API

date: 2025-07-05 title: Supported feed sources and CORS compatibility tags: marmite, feeds, api description: Overview of the built-in feed sources in marmite-feeds — Hacker News, TabNews, DEV.to, GitHub — and how to add custom sources.

marmite-feeds works with any JSON API that exposes native CORS headers. Here is a summary of the built-in sources and their options.

Hacker News — type: "hackernews"

Uses the Algolia HN Search API. No key required.

OptionDescription
queryFull-text search query
tagsFilter: story, show_hn, ask_hn, (story,show_hn)
minPointsMinimum score threshold (default: 1)
{ type: "hackernews", label: "HN · DevOps", query: "docker kubernetes", tags: "story", minPoints: 5 }

TabNews — type: "tabnews"

Brazilian tech community at tabnews.com.br. No configuration needed — returns the latest relevant posts.

{ type: "tabnews", label: "TabNews" }

DEV.to — type: "devto"

Articles from DEV.to. Public API, native CORS, no key required.

OptionDescription
tagFilter by tag (e.g. linux, devops)
usernameFilter by author username
topRecency window in days (e.g. 7 = last 7 days)
{ type: "devto", label: "DEV.to · Linux", tag: "linux", top: 7 }

GitHub — type: "github"

Repository search via the GitHub Search API. Rate limit: 60 requests/hour unauthenticated — use cacheTtlMs to stay within limits.

OptionDescription
queryGitHub search query (language:rust stars:>50)
sortSort: updated, stars, forks
{ type: "github", label: "GitHub · Self-hosted", query: "topic:self-hosted stars:>500", sort: "updated" }

Custom fetcher

Any feed can use an async fetcher function instead of a built-in type. Return an array of items with title, link, score, comments, date, and icon.

{
  label: "Mastodon · #linux",
  fetcher: async function (feed) {
    const res  = await fetch("https://mastodon.social/api/v1/timelines/tag/linux?limit=5");
    const data = await res.json();
    return data.map(post => ({
      title:    post.account.display_name + ': ' + post.content.replace(/<[^>]+>/g, '').slice(0, 80),
      link:     post.url,
      score:    post.favourites_count || 0,
      comments: post.replies_count    || 0,
      date:     post.created_at,
      icon:     "🐘",
    }));
  }
}

Note: Lobste.rs has great content but no CORS headers. Its JSON API requires a server-side proxy to use in the browser.

What's inside

4 built-in source definitions with option tables, 4 code examples, and 1 custom fetcher example

Change this for your project

  • Replace query: "docker kubernetes" with your own search terms
  • Replace tag: "linux" with your desired DEV.to tag
  • Replace query: "topic:self-hosted stars:>500" with your GitHub search query
  • Replace the fetcher function's URL and mapping logic for custom sources

Where it goes

Keep it in your repository where the agent or team that needs it will read it.

Worth borrowing

  • Using a fetcher function to wrap any JSON API into a uniform feed item format
  • Providing per-source option tables that clarify required vs optional parameters

Related Documents