DevDocs
Home
Reference

Configuration

DevDocs is configured through nuxt.config.ts. This page documents every available option.

Basic Configuration

export default defineNuxtConfig({
  modules: ['@nuxt/ui', '@nuxt/content'],

  app: {
    head: {
      title: 'My Docs',
      meta: [
        { name: 'description', content: 'My documentation site' }
      ]
    }
  },

  runtimeConfig: {
    apiSecret: process.env.API_SECRET,
    public: {
      appName: process.env.NUXT_PUBLIC_APP_NAME || 'DevDocs',
    }
  },
})

Content Configuration

export default defineNuxtConfig({
  content: {
    build: {
      markdown: {
        highlight: {
          theme: {
            default: 'github-light',
            dark: 'github-dark',
          },
          langs: ['ts', 'js', 'vue', 'bash', 'json'],
        },
        remarkPlugins: {},
        rehypePlugins: {},
      },
    },
    navigation: {
      fields: ['title', 'description', 'order'],
    },
  },
})

UI Configuration

export default defineNuxtConfig({
  ui: {
    primary: 'violet',
    neutral: 'slate',
  },
})

Available Colors

The following colors are available as primary:

  • red orange amber yellow lime
  • green emerald teal cyan sky
  • blue indigo violet purple fuchsia
  • pink rose

TypeScript Configuration

{
  "extends": "./.nuxt/tsconfig.json",
  "compilerOptions": {
    "strict": true,
    "noUncheckedIndexedAccess": true
  }
}

Performance Options

export default defineNuxtConfig({
  devtools: { enabled: true },

  nitro: {
    compressPublicAssets: true,
    minify: true,
  },

  vite: {
    optimizeDeps: {
      include: ['@tiptap/vue-3'],
    },
  },
})