Skip to content

Workspace

Develop the documentation app and reusable layer in one pnpm workspace.

On this page

Project structure

The repository separates the application from the reusable layer:

text
title: Documentation for your project
description: Everything you need to get started.
links:
  - label: Get started
    to: /getting-started/introduction

The docs app depends on @igrislabs/indocio through workspace:* and extends it by package name. Changes to the layer appear in the documentation app during development.

Commands

Run commands from the workspace root:

sh
pnpm install
pnpm dev
pnpm check
pnpm build

dev, build, generate, and preview target the docs app. check runs workspace lint, formatting, type checks, and layer tests.

Installation prepares the local layer's Nuxt types before the docs app is built.

Deploy the docs as a static site

Run pnpm generate from the repository root. Upload apps/docs/.output/public to your static host.

For Cloudflare Pages, use these build settings:

  • Root directory: the repository root.
  • Build command: pnpm generate.
  • Build output directory: apps/docs/dist (the Cloudflare Pages static preset's output).
  • Environment variable: NUXT_SITE_URL, set to your site's public HTTPS URL so the sitemap can be generated.

Set NUXT_SITE_URL when generating locally too, for example NUXT_SITE_URL=https://docs.example.com pnpm generate.

Static deployment includes the documentation pages and the browser-side content database, so no Cloudflare D1 binding is needed.

Where to make changes

Write Indocio's documentation and configure its landing page in apps/docs/content/. Change its identity in apps/docs/app/app.config.ts.

Edit reusable components, styles, pages, layouts, and module behavior in packages/indocio/. The package does not contain the docs app's content.

More applications

Add another Nuxt application under apps/ when a separate playground is needed. Give it an @igrislabs/indocio: workspace:* dependency and extend @igrislabs/indocio in its Nuxt configuration.

Indocio · Built with Nuxt Content, IPEX, and Akaza UI.