Skip to content

fezcode/runir

Repository files navigation

Runir

Runir Banner

Runir is a modern, CLI-first documentation engine built with Next.js 14 and Tailwind CSS. Transform markdown files into beautiful, interactive documentation sites with zero configuration overhead.

Features

  • Extended Markdown — Custom components like <Tip>, <Note>, <Steps>, <Tabs>, and <CardGroup> work directly in .md files
  • Instant Search — Automatic full-text search indexing with Ctrl+K / Cmd+K shortcut
  • Modern UI — Clean, responsive dark theme optimized for technical documentation
  • CLI Workflow — Initialize, develop, and build with simple commands
  • Static Export — Generates a fully static out/ directory for any hosting platform
  • Configurable — Navigation, branding, theme, and paths via a single runir.config.js

Quick Start

1. Install

npm install -g @fezcode/runir

2. Initialize

mkdir my-docs && cd my-docs
runir init

This creates:

  • runir.config.js — your site configuration
  • docs/ — starter markdown files

3. Develop

runir dev

Open http://localhost:3000 to see your docs.

4. Build

runir build

Static site is exported to ./out/.

Configuration

Customize your site in runir.config.js:

module.exports = {
  name: "My Project Docs",
  description: "Documentation for my project",
  docsDir: "docs",

  // Controls the URL prefix for your docs site
  // ""           → mysite.com/
  // "/docs"      → mysite.com/docs/
  // "/my-repo"   → username.github.io/my-repo/
  basePath: "",

  navigation: [
    {
      title: "Getting Started",
      links: [
        { title: "Introduction", href: "/" },
        { title: "Quick Start", href: "/quick-start" },
      ],
    },
  ],

  navbar: {
    title: "My Docs",
    links: [
      { title: "GitHub", href: "https://github.com/you/repo", external: true },
    ],
  },

  theme: {
    accentColor: "#d97757",
    accentColorLight: "#e0896d",
  },

  search: {
    enabled: true,
    placeholder: "Search docs...",
  },

  footer: {
    text: "Built with Runir",
    links: [],
  },
};

Extended Markdown Components

Write these directly in your .md files:

Callouts

<Tip>Helpful advice or best practice.</Tip>
<Note>Additional context or clarification.</Note>
<Warning>Something that could cause problems.</Warning>
<Info>Background information or reference.</Info>

Steps

<Steps>
<Step title="First">Do this first.</Step>
<Step title="Second">Then this.</Step>
</Steps>

Tabs

<Tabs>
<Tab title="npm">npm install foo</Tab>
<Tab title="yarn">yarn add foo</Tab>
</Tabs>

Cards

<CardGroup cols={2}>
<Card title="Guide" href="/guide">Description here.</Card>
<Card title="API" href="/api">API reference.</Card>
</CardGroup>

Deployment

GitHub Pages

  1. Set basePath to your repo name in runir.config.js:

    basePath: "/my-repo"
  2. The runir init command creates a .github/workflows/deploy-docs.yml workflow. Push to main and enable GitHub Pages (source: GitHub Actions) in your repo settings.

Vercel / Netlify / Cloudflare Pages

Set build command to runir build and publish directory to out. Leave basePath as "".

Any Static Host

Run runir build and upload the out/ directory.

CLI Reference

Command Description
runir init Create runir.config.js and docs/ with starter templates
runir dev Start dev server with hot reload
runir build Build static site to ./out/
runir help Show help

License

MIT

About

Modern, CLI-first documentation engine built with Next.js 14 and Tailwind CSS. Transform Markdown files into beautiful, interactive, and searchable documentation sites with zero configuration.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors