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.
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.titlewhen present, otherwiseconfig.titlefrontmatter.descriptionwhen present, otherwiseconfig.descriptionfrontmatter.imagewhen present, otherwiseseo.image
---
title: API Reference
description: Complete API documentation.
image: /og/api.png
---Favicon
seo: {
favicon: { href: '/favicon.png', type: 'image/png', sizes: '64x64' },
}You can provide a string, an object, or an array:
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:
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.
seo: {
jsonLd: true,
}Pass an object or array to provide custom JSON-LD.
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.
seo: {
sitemap: {
changefreq: 'weekly',
priority: 0.8,
},
}Pages with noindex: true are excluded.
Robots
seo.robots: true writes:
User-agent: *
Allow: /
Sitemap: https://docs.example.com/sitemap.xmlUse raw content:
seo: {
robots: 'User-agent: *\nDisallow: /private\n',
}Or rules:
seo: {
robots: {
rules: ['User-agent: *', 'Allow: /'],
sitemap: true,
},
}llms.txt
Docgo can generate llms.txt for AI/search consumption.
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:
seo: {
noindex: true,
}Override per page:
---
noindex: false
---When a page is noindexed, Docgo adds:
<meta name="robots" content="noindex,nofollow" />