Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Remix stack for an MDX docs site that is quick to set up and customize
Remix Docs Stack is a Remix template for building MDX-based documentation sites, providing a complete starter with docs, blog, pages, search, RSS, and sitemap support. It was created by the developer freekrai and is installed via npx create-remix --template freekrai/remix-docs.
Remix Docs Stack is an open-source Remix stack that turns a folder of MDX content into a documentation website with blog and page sections. It takes MDX files stored under content/docs, content/posts, and content/pages — each as a folder containing an index.mdx file — and produces routes whose slugs come from the folder names. The primary output is a customizable docs site styled with Tailwind CSS, with configuration handled through an app/docs.config.ts file.
content/docs/getting-started/index.mdx, and the folder name becomes the URL slug; extra .mdx files inside that folder become nested routes like /hello-world/abc.blog-cache.json, docs-cache.json, and page-cache.json into the content directory, which are later used for blog indexes, RSS feeds, and sitemaps.meta, date, updated, excerpt, and custom HTTP headers fields in YAML frontmatter, giving per-page control over titles, descriptions, and cache headers.app/docs.config.ts controls base path, language, site title, description, top navigation, sidebar link groups, an optional search toggle, and an edit-on-GitHub link.USE_FILESYSTEM_OR_GITHUB to gh switches to reading from a GitHub repo using GITHUB_TOKEN, GITHUB_OWNER, and GITHUB_REPO, which is useful on serverless hosts like Cloudflare.dev and build scripts both run the Tailwind CLI, so the starter ships with utility-first styling already wired up.server.js example using the Remix Vercel adapter and a serverBuildTarget of vercel in remix.config.js; Cloudflare Pages and Netlify guides are listed as coming soon.content/docs, customize the sidebar in docs.config.ts, and use the built-in edit link for community contributions.content/posts and pages under content/pages, all sharing the same layout and generated sitemap/RSS files./2022/test without extra routing configuration.You install the stack with npx create-remix --template freekrai/remix-docs, copy .env.example to .env and set SESSION_SECRET plus your content-access mode, run npm install, and start with npm run dev. On build, the project compiles the Remix app, runs the Tailwind CLI, and generates the three cache JSON files from the MDX content. The dev script watches both the Remix app and the blog cache, and the site runs at http://localhost:3000.
SESSION_SECRET is required for sessions such as dark mode. To use the filesystem content mode, leave USE_FILESYSTEM_OR_GITHUB as fs (the default); switching it to gh requires GITHUB_TOKEN, GITHUB_OWNER, and GITHUB_REPO so content can be read from a GitHub repository.
Create a new folder under content/docs with an index.mdx file inside it. The folder name becomes the URL slug — for example, content/docs/installation/index.mdx maps to /docs/installation. You can also place extra .mdx files in the folder for nested routes.
The stack is set up for Vercel with a ready-to-use server.js example and a serverBuildTarget of vercel. Cloudflare Pages and Netlify instructions are listed as "Coming Soon" in the README, so they are not yet covered.
GitHub mode is designed for hosts like Cloudflare where the local file system is not accessible. Set USE_FILESYSTEM_OR_GITHUB to gh and provide the GitHub token, owner, and repo variables; the app will fetch MDX content from that repository instead of reading local files.
