Nuxt module

Overview

All options of the @ranklint/nuxt module in one nuxt.config.ts block.
// nuxt.config.ts
export default defineNuxtConfig({
  modules: ['@ranklint/nuxt'],
  ranklint: {
    site: { url: 'https://example.com', name: 'Example' },
    sitemap: {
      enabled: true,              // false or sitemap: false — the route is not registered
      path: '/sitemap.xml',
      sources: [ /* three kinds of sources, see below */ ],
      autoRoutes: true,           // false — no automatic routes from app/pages (i18n / multi-app)
      cacheTtl: 3600,             // in-memory response cache, seconds
    },
    robots: { mode: 'owner' },    // false — leave robots.txt alone entirely
    jsonLd: true,                 // false — useJsonLd is not registered
    devtools: true,               // false — the SEO tab is not registered
  },
})

Works with zero configuration: /sitemap.xml and /robots.txt are available right after npx nuxi module add @ranklint/nuxt. Requires Nuxt 4 — throws a clear error when compatibilityVersion < 4.

Every feature block is disableable — disabled code is not registered at all. The module's client bundle contribution is 485 bytes gzip (a 5 KB limit is guarded by a CI test).