Installation

Getting started with SuperDocs is straightforward and fast. Whether you want to try it out immediately or integrate it into your project, we’ve got you covered.

Prerequisites

  • Node.js: Version 18.0.0 or higher
  • npm, yarn, or pnpm package manager

Installation Methods

Global Installation

Install SuperDocs globally to use it across multiple projects:

Terminal window
npm install -g @devrohit06/superdocs
# or
pnpm add -g @devrohit06/superdocs

Then use it anywhere:

Terminal window
superdocs build -i ./my-docs -o ./dist
superdocs dev -i ./my-docs

Method 1: The Quickest Way (npx)

If you just want to spin up a docs site from an existing folder of markdown files without installing anything:

Terminal window
npx @devrohit06/superdocs dev -i ./my-docs-folder

This command will:

  1. Scaffold a temporary Astro project
  2. Copy your docs into it
  3. Start a local development server at http://localhost:4321

Method 2: Adding to an Existing Project

If you want to keep your docs versioned with your code:

  1. Create a docs folder in your repository
  2. Add a docs-config.json file inside it
  3. Add Markdown or MDX files
  4. Run from your root:
Terminal window
npx @devrohit06/superdocs dev -i ./docs

Method 3: Using a Custom Template

You can use custom templates from GitHub or local paths:

Terminal window
npx @devrohit06/superdocs dev -i ./docs -t github:owner/template-repo
# or
npx @devrohit06/superdocs dev -i ./docs -t ./path/to/local/template

Next Steps

After installation, explore these resources: