Rocket
On this page

Manual Quick Start#

Create the smallest useful Rocket project: one config file, one Markdown Page, and a local dev server.

Rocket requires Node.js 22 or newer. Check your version with node --version.

Create a Project#

Create a directory and initialize npm:

mkdir my-rocket-site
cd my-rocket-site
npm init -y

Install Rocket:

npm install @rocket/js

Initialize the Rocket files:

npx rocket init

The initializer creates rocket-config.js, docs/pages/index.rocket.md, and a removable project-local Rocket Agent Skill at .agents/skills/rocket/SKILL.md. It does not overwrite existing files, install dependencies, or run a build.

Check the Config#

rocket-config.js includes the general documentation Pages under docs/pages and colocated component reference Pages under src:

/** @type {import('@rocket/js/types.js').RocketConfig} */
export default {
  includeGlobs: ['docs/pages/**/*.rocket.{md,js}', 'src/**/*.rocket.{md,js}'],
};

includeGlobs tells Rocket which files can become Pages.

rocket init also adds npm scripts when those names are available:

{
  "scripts": {
    "start": "rocket start",
    "build": "rocket build"
  }
}

Check the First Page#

The generated Page lives at docs/pages/index.rocket.md:

```js server
export const config = {
  path: '/',
  metadata: { title: 'My Rocket Site' },
};

export { layout } from '@rocket/js/layout.js';
```

# Rocket Site

This Page is rendered by Rocket.

## Next steps

- Edit this Page in `docs/pages/index.rocket.md`.
- Add general documentation Pages under `docs/pages`.
- Add component reference Pages next to the components they document.
- Run `npm run build` to verify the site.

The path value controls the public URL. This file renders at / because config.path is /.

Run the Dev Server#

npm start

Rocket starts a local dev server and opens the site at http://localhost:8888.

The dev server reloads after page changes. If a new Page does not appear, press Ctrl+R in the terminal running Rocket to restart the server.

Add One More Page#

Create docs/pages/about.rocket.md:

```js server
export const config = {
  path: '/about',
  metadata: { title: 'About' },
  menu: {
    order: 20,
  },
};

export { layout } from '@rocket/js/layout.js';
```

# About

This page renders at `/about`.

Add menu.order to the home page if you want it to appear before About:

```js server
export const config = {
  path: '/',
  metadata: { title: 'My Rocket Site' },
  menu: {
    order: 10,
  },
};

export { layout } from '@rocket/js/layout.js';
```

Build the Site#

Run a production build:

npm run build

Rocket writes the generated site to dist/.

Next Steps#

You now have the project shell that the rest of the docs build on.

Continue with Build a Site to turn this starter into a small docs site with user-owned data, layout, menus, assets, and component documentation. Use Troubleshooting if the dev server does not start or a Page does not appear.