Navigated to /plugins

Tavo.js ecosystem

Add capabilities without adding complexity.

Plugins connect focused capabilities to Tavo.js application and build lifecycle. Start with official packages, then share what you build with the community.

Official plugins

Small packages. Clear responsibilities.

First-party plugins are maintained alongside Tavo.js and designed to work with the framework's conventions and production tooling.

Insights

Analytics

Consent-aware Google Analytics and Google Tag Manager integration for Tavo.js applications.

Official
npm install @tavojs/analytics

Declares and explains its required analytics bootstrap permission.

View package →
SEO

Sitemap

Generate sitemap.xml and robots.txt from Tavo.js routes as part of the application build.

Official
npm install @tavojs/sitemap

Declares its standard /sitemap.xml and optional /robots.txt exposure.

View package →
SEO

Structured Data

Generate route-aware Schema.org JSON-LD for site identity, software applications, breadcrumbs, and custom schemas.

Official
npm install @tavojs/structured-data

Adds JSON-LD script elements without a public route, network request, or unsafe permission.

View package →

Configuration

Install trusted plugin descriptors.

Installing a trusted plugin enables the reviewed permissions and default public exposure declared in its manifest. These examples match the current package usage guides.

AnalyticsDeclares and explains its required analytics bootstrap permission.

Choose one transport: Google Analytics or Google Tag Manager. In after-consent mode, grant consent before calling loadAnalytics(); pre-consent events are not replayed.

TStavo.config.ts
tsimport { createAnalyticsPlugin } from "@tavojs/analytics";
import { defineConfig } from "@tavojs/core/config";

const analytics = createAnalyticsPlugin({
  googleAnalytics: { measurementId: "G-XXXXXXXXXX" }
});

export default defineConfig({
  plugins: [analytics]
});
SitemapDeclares its standard /sitemap.xml and optional /robots.txt exposure.

Concrete pages are discovered automatically. Add explicit entries for dynamic routes. Static arrays can be emitted at build time; callbacks run per request unless emitStatic is enabled.

TStavo.config.ts
tsimport { createSitemapPlugin } from "@tavojs/sitemap";
import { defineConfig } from "@tavojs/core/config";

const sitemap = createSitemapPlugin({
  siteUrl: "https://example.com",
  robots: true,
  entries: ["/products/featured"]
});

export default defineConfig({
  plugins: [sitemap]
});
Structured DataAdds JSON-LD script elements without a public route, network request, or unsafe permission.

Use the site helper for route-aware metadata and render it from the root layout head. Global plugin mode is intended only for a schema deliberately repeated on every SSR or prerendered page.

TSsrc/pages/_layout.tsx
tsimport { Seo } from "@tavojs/core";
import type { PageLoadContext } from "@tavojs/core/router";
import { createStructuredDataSite } from "@tavojs/structured-data";

const structuredData = createStructuredDataSite({
  siteUrl: "https://example.com",
  website: { name: "Example" },
  organization: { name: "Example Project" },
  resolve({ pathname }) {
    return pathname === "/docs"
      ? { breadcrumbs: [{ name: "Home", url: "/" }, { name: "Docs" }] }
      : undefined;
  }
});

export function head(context: PageLoadContext) {
  const canonical = new URL(context.pathname, "https://example.com").href;
  return (
    <>
      <Seo canonical={canonical} />
      {structuredData.head(context)}
    </>
  );
}

Community catalog

Built something useful? Share it.

Tell us about your plugin. We will review its documentation, compatibility, maintenance, and security posture before adding it to the catalog.

  • Publicly available package
  • Usage documentation and supported Tavo.js versions
  • Clear license and data-collection disclosure
An email address or public HTTPS profile URL.
What does the plugin add to a Tavo.js application?

The Privacy Policy explains how the submission and contact details are used and retained.

Submissions are sent privately to the Tavo.js review service. Nothing is published automatically, and contact details are not included in analytics events.