DocgoDocgo
Latest
/Site Configuration

SEO

Configure metadata, canonical URLs, Open Graph images, Twitter cards, JSON-LD, sitemap.xml, robots.txt, llms.txt, and noindex rules.

Docgo emits SEO metadata for every generated page and can write SEO files during the production build.

Site URL

Set siteUrl to enable canonical URLs and absolute links in generated files.

docgo.config.mjs
export default defineConfig({
  siteUrl: 'https://docs.example.com',
});

Without siteUrl, Docgo still renders static HTML, but canonical URLs and absolute sitemap entries are omitted.

Page metadata

Each page uses:

  • frontmatter.title when present, otherwise config.title
  • frontmatter.description when present, otherwise config.description
  • frontmatter.image when present, otherwise seo.image
docs/api-reference.mdx
---
title: API Reference
description: Complete API documentation.
image: /og/api.png
---

Favicon

docgo.config.mjs
seo: {
  favicon: { href: '/favicon.png', type: 'image/png', sizes: '64x64' },
}

You can provide a string, an object, or an array:

docgo.config.mjs
seo: {
  favicon: [
    { href: '/favicon.ico' },
    { href: '/favicon.svg', type: 'image/svg+xml' },
  ],
}

Open Graph and Twitter

Docgo emits Open Graph tags automatically. Configure a default social image and Twitter card metadata:

docgo.config.mjs
seo: {
  image: '/og.png',
  twitter: {
    card: 'summary_large_image',
    site: '@kyechan99',
    creator: '@kyechan99',
  },
}

seo.twitter can also be a string, which is treated as the site value.

JSON-LD

jsonLd: true emits a default WebSite and WebPage graph.

docgo.config.mjs
seo: {
  jsonLd: true,
}

Pass an object or array to provide custom JSON-LD.

docgo.config.mjs
seo: {
  jsonLd: {
    '@context': 'https://schema.org',
    '@type': 'SoftwareApplication',
    name: 'Docgo',
  },
}

Sitemap

Docgo writes sitemap.xml when seo.sitemap is not false and siteUrl is configured.

docgo.config.mjs
seo: {
  sitemap: {
    changefreq: 'weekly',
    priority: 0.8,
  },
}

Pages with noindex: true are excluded.

Robots

seo.robots: true writes:

robots.txt
User-agent: *
Allow: /
Sitemap: https://docs.example.com/sitemap.xml

Use raw content:

docgo.config.mjs
seo: {
  robots: 'User-agent: *\nDisallow: /private\n',
}

Or rules:

docgo.config.mjs
seo: {
  robots: {
    rules: ['User-agent: *', 'Allow: /'],
    sitemap: true,
  },
}

llms.txt

Docgo can generate llms.txt for AI/search consumption.

docgo.config.mjs
seo: {
  llmsTxt: {
    title: 'Example Docs',
    description: 'Developer docs for an example product.',
  },
}

The file lists indexable pages with titles, links, and descriptions.

Noindex

Set a global noindex rule:

docgo.config.mjs
seo: {
  noindex: true,
}

Override per page:

docs/private-page.mdx
---
noindex: false
---

When a page is noindexed, Docgo adds:

rendered head
<meta name="robots" content="noindex,nofollow" />
Edit this page

Last updated: