Skip to content
Blume
Esc
↑↓navigate↵open⌘Jpreview

Remote MDX

Fetch Markdown and MDX over HTTP from a GitHub repository or a raw URL with the mdxRemote() source, rendered with every Blume component.

The built-in mdxRemote() adapter fetches raw .md/.mdx over HTTP. Enumerate files either from a GitHub repo subtree (github) or explicitly against a raw base URL (url + files):

import { defineConfig } from "blume";
import { filesystem, mdxRemote } from "blume/sources";

export default defineConfig({
  content: {
    sources: [
      filesystem({ root: "docs" }),
      // The docs/ subtree of acme/sdk, mounted under /sdk
      mdxRemote({
        prefix: "sdk",
        github: { owner: "acme", repo: "sdk", ref: "main", path: "docs" },
      }),
    ],
  },
});

To list the files yourself, point url at a raw base URL:

mdxRemote({
  prefix: "sdk",
  url: "https://raw.githubusercontent.com/acme/sdk/main/docs",
  files: ["intro.mdx", "guide.mdx"],
});

A private repo’s token is read from the GITHUB_TOKEN environment variable — the adapter declares it, so blume dev and blume build warn when it’s unset. It is never inlined into your config or generated output, and it is only ever sent to GitHub’s own hosts (api.github.com, raw.githubusercontent.com), never to a custom url base. A public repo works without it.

Remote pages are rendered with full MDX-plus-component fidelity: their bodies are materialized into a hidden staging directory and rendered through Astro alongside your local docs, so callouts, tabs, and every other Blume component keep working.

Like every remote source, fetched pages are cached for offline builds and refreshed with blume sync — see Caching and offline builds.

Last updated on September 27, 2026

Was this page helpful?