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

ImportProvides
tenoncmsdefineCms, defineCollection, defineGlobal, definePlugin, defineTask, verifyWebhook, the error classes, SEO helpers like seoHead and sitemapXml, path helpers like localizePath, slugify and every config type
tenoncms/clientcreateClient, createRequestClient, CmsError and the content types. See Client
tenoncms/registerTypes only. Registers your cms for the client. See Types without an adapter
tenoncms/authmagicLink() and emailOTP(), the better-auth plugins with sign-up off. See Authentication
tenoncms/presetspagesPreset, menuPreset, stringsPreset, and the parts page, seo, menu, strings, settings. See Presets

Databases

ImportProvides
tenoncms/sqlitesqlite(path), a SQLite file through node:sqlite
tenoncms/libsqllibsql(url), for libSQL and Turso
tenoncms/postgrespostgres(url), for Postgres
tenoncms/pglitepglite(client), for PGlite
tenoncms/cloudflaredurableObject() and tenonObject(), for SQLite in a Durable Object

See Databases.

Frameworks

ImportProvides
tenoncms/astroThe Astro integration tenonCms(). See Astro
tenoncms/nuxtThe Nuxt module, set with tenonCms in nuxt.config.ts. See Nuxt
tenoncms/vitetenonAdmin(), the Vite plugin for TanStack Start and other frameworks. See TanStack Start

Components

ImportProvides
tenoncms/astro/componentsBlocks, Image, Link, Picture, Richtext and Seo for Astro
tenoncms/vueBlocks, Image, Link, Picture, Richtext and useBlockEdit for Vue
tenoncms/reactBlocks, Image, Link, Picture, Richtext and Seo for React
tenoncms/componentslinkAttrs, imageAttrs, pictureAttrs and editBlock, for any framework

See Components.

Rich text

ImportProvides
tenoncms/richtextrenderRichtext, walkRichtext, richtextReferences, safeRichtextUrl and the list of features
tenoncms/richtext/astroThe Richtext component for Astro
tenoncms/richtext/vueThe Richtext component for Vue
tenoncms/richtext/reactThe Richtext component for React

See Rich text.

Live preview

ImportProvides
tenoncms/previewpreview, isLivePreview, edit, merge, getDrafts and subscribe
tenoncms/preview/vueuseDraft for Vue
tenoncms/preview/reactuseDraft for React

See Live preview.

Admin

ImportProvides
tenoncms/adminclientRef, translate, translator and the types of custom fields, pages and bar items
tenoncms/admin/vuerenderVue, to mount a Vue component in the admin
tenoncms/admin/reactrenderReact, to mount a React component in the admin
tenoncms/admin/mountmountAdmin(), to mount the whole admin in a page of your own
tenoncms/admin/barmountAdminBar(), which mounts the admin bar on a page

See Custom fields and Custom pages and actions.

Media storage

ImportProvides
tenoncms/media/locallocal({ dir }), files on disk. Not on Cloudflare Workers
tenoncms/media/s3s3(), any S3-compatible storage
tenoncms/media/r2r2(), Cloudflare R2, with a binding or with the S3 API
tenoncms/media/defaultThe default storage in .uploads. Tenon uses it when media is not set

See Media storage.

Image providers

ImportProvides
tenoncms/media/ipxipx(), renders variants on your server. Not on Workers
tenoncms/media/cloudflarecloudflare(), renders with Cloudflare Images
tenoncms/media/vercelvercel(), Vercel Image Optimization
tenoncms/media/netlifynetlify(), Netlify Image CDN
tenoncms/media/imgiximgix({ baseURL })
tenoncms/media/cloudinarycloudinary({ baseURL })
tenoncms/media/imagekitimagekit({ baseURL })
tenoncms/media/bunnybunny({ baseURL })
tenoncms/media/imgproxyimgproxy({ baseURL, key, salt })
tenoncms/media/thumborthumbor({ baseURL, key, origin })

See Image providers.

Email

ImportProvides
tenoncms/email/smtpsmtp(). Needs the nodemailer package. See SMTP
tenoncms/email/cloudflarecloudflareEmail(). See Cloudflare Email Service

Plugins

ImportProvides
tenoncms/plugins/redirectsRedirectsPlugin() and resolveRedirect()
tenoncms/plugins/exampleExamplePlugin(), 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.