Configuration

GTM Toolkit stores all project settings in gtm.config.js. Tweak the generated file to match your content paths, analytics stack, and AI preferences.

Sample gtm.config.js
The init command seeds this structure; edit to suit your workflow.
// gtm.config.js
module.exports = {
  framework: 'nextjs',
  analytics: {
    ga4: {
      measurementId: 'G-XXXXXXX',
      enabled: true,
    },
    posthog: {
      apiKey: process.env.NEXT_PUBLIC_POSTHOG_KEY ?? '',
      host: 'https://app.posthog.com',
      enabled: false,
    },
  },
  seo: {
    siteName: 'VC-Saga',
    siteUrl: 'https://www.vcsaga.com',
    defaultTitle: 'VC-Saga',
    defaultDescription: 'Developer-native marketing automation with GTM Toolkit.',
    twitterHandle: '@raz_kaplan',
  },
  content: {
    contentPath: 'content',
    blogPath: 'content/blog',
    outputPath: 'public',
  },
  robots: {
    allowAIBots: true,
    customRules: [],
    sitemapUrl: 'https://www.vcsaga.com/sitemap.xml',
  },
  geo: {
    enabled: true,
    optimizeForAI: true,
    structuredData: true,
  },
};

Re-run npx gtm-toolkit init --skip-install at any time to regenerate the file with new answers. Manual edits are preserved unless you overwrite the file.

Content Paths
Tell the CLI where to look for markdown and where to output generated files.
contentPath: root directory scanned by lint and suggestions. Defaults to content.
blogPath: optional helper for blog-specific rules. Set to content/blog when you follow the recommended structure.
outputPath: destination for generated assets. Next.js projects usually keep this at public.
module.exports = {
  content: {
    contentPath: 'content',
    blogPath: 'content/blog',
    outputPath: 'public',
  },
};