/** * Docs module — collaborative documentation via Docmost. * * Wraps the Docmost instance as an external app embedded in the rSpace shell. */ import { Hono } from "hono"; import { renderShell, renderExternalAppShell } from "../../server/shell"; import { getModuleInfoList } from "../../shared/module"; import type { RSpaceModule } from "../../shared/module"; const routes = new Hono(); const DOCMOST_URL = "https://docs.cosmolocal.world"; routes.get("/api/health", (c) => { return c.json({ ok: true, module: "rdocs" }); }); routes.get("/", (c) => { const space = c.req.param("space") || "demo"; const view = c.req.query("view"); if (view === "demo") { return c.html(renderShell({ title: `${space} — Docs | rSpace`, moduleId: "rdocs", spaceSlug: space, modules: getModuleInfoList(), theme: "dark", body: `
Collaborative documentation powered by Docmost. Create wikis, knowledge bases, and shared documents for your community.
Open DocmostCollaborative documentation powered by Docmost. Create wikis, knowledge bases, and shared documents for your community.