Reference
Package exports
Every import path of the tenoncms package, and what it provides.
tenoncms is one package with many import paths. Each path loads only what it needs, so a page that reads content does not load the admin, a database driver or an image library.
Core
| Import | Provides |
|---|---|
tenoncms | defineCms, defineCollection, defineGlobal, definePlugin, defineTask, verifyWebhook, the error classes, SEO helpers like seoHead and sitemapXml, path helpers like localizePath, slugify and every config type |
tenoncms/client | createClient, createRequestClient, CmsError and the content types. See Client |
tenoncms/register | Types only. Registers your cms for the client. See Types without an adapter |
tenoncms/auth | magicLink() and emailOTP(), the better-auth plugins with sign-up off. See Authentication |
tenoncms/presets | pagesPreset, menuPreset, stringsPreset, and the parts page, seo, menu, strings, settings. See Presets |
Databases
| Import | Provides |
|---|---|
tenoncms/sqlite | sqlite(path), a SQLite file through node:sqlite |
tenoncms/libsql | libsql(url), for libSQL and Turso |
tenoncms/postgres | postgres(url), for Postgres |
tenoncms/pglite | pglite(client), for PGlite |
tenoncms/cloudflare | durableObject() and tenonObject(), for SQLite in a Durable Object |
See Databases.
Frameworks
| Import | Provides |
|---|---|
tenoncms/astro | The Astro integration tenonCms(). See Astro |
tenoncms/nuxt | The Nuxt module, set with tenonCms in nuxt.config.ts. See Nuxt |
tenoncms/vite | tenonAdmin(), the Vite plugin for TanStack Start and other frameworks. See TanStack Start |
Components
| Import | Provides |
|---|---|
tenoncms/astro/components | Blocks, Image, Link, Picture, Richtext and Seo for Astro |
tenoncms/vue | Blocks, Image, Link, Picture, Richtext and useBlockEdit for Vue |
tenoncms/react | Blocks, Image, Link, Picture, Richtext and Seo for React |
tenoncms/components | linkAttrs, imageAttrs, pictureAttrs and editBlock, for any framework |
See Components.
Rich text
| Import | Provides |
|---|---|
tenoncms/richtext | renderRichtext, walkRichtext, richtextReferences, safeRichtextUrl and the list of features |
tenoncms/richtext/astro | The Richtext component for Astro |
tenoncms/richtext/vue | The Richtext component for Vue |
tenoncms/richtext/react | The Richtext component for React |
See Rich text.
Live preview
| Import | Provides |
|---|---|
tenoncms/preview | preview, isLivePreview, edit, merge, getDrafts and subscribe |
tenoncms/preview/vue | useDraft for Vue |
tenoncms/preview/react | useDraft for React |
See Live preview.
Admin
| Import | Provides |
|---|---|
tenoncms/admin | clientRef, translate, translator and the types of custom fields, pages and bar items |
tenoncms/admin/vue | renderVue, to mount a Vue component in the admin |
tenoncms/admin/react | renderReact, to mount a React component in the admin |
tenoncms/admin/mount | mountAdmin(), to mount the whole admin in a page of your own |
tenoncms/admin/bar | mountAdminBar(), which mounts the admin bar on a page |
See Custom fields and Custom pages and actions.
Media storage
| Import | Provides |
|---|---|
tenoncms/media/local | local({ dir }), files on disk. Not on Cloudflare Workers |
tenoncms/media/s3 | s3(), any S3-compatible storage |
tenoncms/media/r2 | r2(), Cloudflare R2, with a binding or with the S3 API |
tenoncms/media/default | The default storage in .uploads. Tenon uses it when media is not set |
See Media storage.
Image providers
| Import | Provides |
|---|---|
tenoncms/media/ipx | ipx(), renders variants on your server. Not on Workers |
tenoncms/media/cloudflare | cloudflare(), renders with Cloudflare Images |
tenoncms/media/vercel | vercel(), Vercel Image Optimization |
tenoncms/media/netlify | netlify(), Netlify Image CDN |
tenoncms/media/imgix | imgix({ baseURL }) |
tenoncms/media/cloudinary | cloudinary({ baseURL }) |
tenoncms/media/imagekit | imagekit({ baseURL }) |
tenoncms/media/bunny | bunny({ baseURL }) |
tenoncms/media/imgproxy | imgproxy({ baseURL, key, salt }) |
tenoncms/media/thumbor | thumbor({ baseURL, key, origin }) |
See Image providers.
| Import | Provides |
|---|---|
tenoncms/email/smtp | smtp(). Needs the nodemailer package. See SMTP |
tenoncms/email/cloudflare | cloudflareEmail(). See Cloudflare Email Service |
Plugins
| Import | Provides |
|---|---|
tenoncms/plugins/redirects | RedirectsPlugin() and resolveRedirect() |
tenoncms/plugins/example | ExamplePlugin(), code to copy for a plugin of your own |
The paths below them, like tenoncms/plugins/redirects/admin, hold the admin parts of these plugins. The plugins load them through clientRef(). See Plugins.
Related resources
- Configuration: the options these imports plug into.
- Errors and types: the types from
tenoncmsandtenoncms/client.