Skip to content
Back to search

onion-docs

Onion documentation: guides, HTTP API and MCP server

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/hostwerkfze--onion-docs/badge.svg)](/listings/hostwerkfze--onion-docs)

HTML

<a href="/listings/hostwerkfze--onion-docs"><img src="/api/listings/hostwerkfze--onion-docs/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 62 lines
  1. # Onion Docs
  2. Public documentation for [Onion](https://onion4.ai): guides, the HTTP API and
  3. the MCP server. Built with [Starlight](https://starlight.astro.build) (Astro)
  4. from the Markdown in `src/content/docs`, styled with the Onion design tokens,
  5. and published to GitHub Pages by `.github/workflows/deploy.yml` on every push
  6. to `main`. Readers get it at **https://onion4.ai/docs/**: the landing's nginx
  7. (onion-landing `nginx.conf`) serves the Pages site under that path.
  8. ## Run it
  9. ```sh
  10. npm ci
  11. npm run dev # http://localhost:4321/docs/
  12. npm run build # into dist/, with the search index
  13. npm run preview # serve dist/
  14. ```
  15. Node 22.23.4 or newer.
  16. ## Write a page
  17. 1. Add a `.md` file under `src/content/docs/<topic>/` with a `title` and a
  18. `description` in its front matter. Use `.mdx` only when the page needs
  19. Starlight components (`Tabs`, `Steps`, `Aside`).
  20. 2. Put it in the `sidebar` in `astro.config.mjs`, under its topic.
  21. 3. Link to other pages from the site root — `[limits](/guides/rate-limits/)` —
  22. the base path is added at build time.
  23. The four top-level sidebar groups are the topics (`src/components/topics.ts`),
  24. shown as tabs in the header from 72rem and at the top of the sidebar below
  25. that (`TopicNav.astro`); a page's sidebar shows only its own topic
  26. (`src/route-middleware.ts`).
  27. What goes here: what a customer can do with an API key or through MCP, as the
  28. service does it today. Check behaviour against the code and the OpenAPI spec
  29. (`https://user.onion4.ai/api/v1/openapi.yaml`) before writing it down; internal
  30. endpoints and infrastructure stay out.
  31. ## Design tokens
  32. `src/styles/tokens.css` is a copy of the kit's generated tokens
  33. (`@hostwerkfze/alternanthera`, `src/generated/tokens.css` in onion-ui-kit).
  34. `src/styles/onion.css` maps Starlight's variables onto them. After a kit
  35. release:
  36. ```sh
  37. npm run sync-tokens # from ../onion-ui-kit
  38. KIT_DIR=/path/to/onion-ui-kit npm run sync-tokens
  39. ```
  40. ## Deploy
  41. GitHub Pages, source "GitHub Actions". The pages are fetched from
  42. `https://hostwerkfze.github.io/onion-docs/` by the landing and shown at
  43. `https://onion4.ai/docs/`, so the site is built for that address
  44. (`astro.config.mjs`); opened directly on github.io it has no styles.
  45. To move it to a host of its own (`docs.onion4.ai`): set the repository
  46. variables `DOCS_SITE` (`https://docs.onion4.ai`) and `DOCS_BASE` (`/`), add
  47. the domain in Settings → Pages, and point the landing's `/docs/` at it with a
  48. redirect.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.