`gtm-toolkit generate`

Produce robots.txt, sitemap.xml, and reusable metadata files directly from your GTM Toolkit config.

Quick Usage
Generate all supported assets in one command
# Generate robots.txt, sitemap.xml, and meta templates
npx gtm-toolkit generate --all
Meta Template Notes
The `--meta` flag prints a starter template you can adapt.

For now, the CLI logs suggested meta tag values instead of writing them to disk. Redirect stdout to capture the snippet, then paste it into the component or layout that manages your metadata.

Options & Flags
Select individual outputs when you do not need the full suite
--robots
Generate robots.txt only
--sitemap
Generate sitemap.xml only
--meta
Log a starter meta tags template (edit manually afterward)
--all
Generate every supported asset
robots.txt Output
Respect your AI and crawler policy automatically
# robots.txt generated by GTM Toolkit
User-agent: Claude-Web
Allow: /

User-agent: ChatGPT-User
Allow: /

User-agent: *
Disallow: /admin/
Disallow: /private/

Sitemap: https://raz-kaplan-website.vercel.app/sitemap.xml
sitemap.xml Output
Derived from the actual markdown content under your configured directory

GTM Toolkit traverses the content tree, respects draft flags, and uses frontmatter dates for <lastmod>.

<url>
  <loc>https://raz-kaplan-website.vercel.app/blog/artificial-entertainment</loc>
  <lastmod>2025-10-12</lastmod>
  <changefreq>weekly</changefreq>
  <priority>0.8</priority>
</url>
Post-Generation Checklist
How to integrate generated files into your workflow
  • • Commit the updated SEO files so they are deployed with your site.
  • • Publish robots.txt and sitemap.xml under your framework’s public/static directory.
  • • Re-run gtm-toolkit generate --all in CI after content merges to keep the sitemap current.