xyd 0.1.0-alpha - Coming Soon

Writing Content
/
SEO

SEO

Enhance your documentation's search engine visibility with custom meta tags

Our documentation platform provides automatic meta tag generation, but you have a full control to customize them through the docs.json configuration or individual page meta.

Global Meta Tags

Set default meta tags for your entire documentation by adding the seo.metatags section to your docs.json:

{
"seo": {
"metatags": {
"og:image": "https://your-domain.com/default-social-image.jpg",
"description": "Your default site description"
}
}
}

Page-specific Meta Tags

Customize meta tags for individual pages using page meta:

---
title: 'Custom Page Title'
'og:image': 'https://your-domain.com/page-specific-image.jpg'
'description': 'Page-specific description'
---

When using meta tags containing colons (like og:image), remember to wrap them in quotes in your frontmatter.

Sitemaps

Your documentation automatically includes:

  • A sitemap.xml file (accessible at /sitemap.xml)
  • A robots.txt file

For good sitemap.xml generation make sure you filled seo.domain.

Controlling Indexing

To prevent search engines from indexing specific pages, add to the page's frontmatter:

---
noindex: true
---

For site-wide indexing control, set in docs.json:

"seo": {
"metatags": {
"robots": "noindex"
}
}

Meta Tags Reference

Here's a curated list of the most important meta tags you can use to optimize your documentation:

{
"robots": "noindex",
"charset": "UTF-8",
"viewport": "width=device-width, initial-scale=1, maximum-scale=1",
"description": "Your page description",
"keywords": "keyword, keyword2",
"author": "Author Name",
"googlebot": "index, follow",
"google": "notranslate",
"google-site-verification": "verification_token",
"generator": "xyd",
"theme-color": "#ffffff",
"color-scheme": "light",
"format-detection": "telephone=no",
"referrer": "origin",
"refresh": "0;url=https://example.com",
"rating": "general",
"revisit-after": "7 days",
"language": "en-US",
"copyright": "Copyright 2024",
"reply-to": "contact@example.com",
"distribution": "global",
"coverage": "Worldwide",
"category": "Technology",
"target": "all",
"HandheldFriendly": "true",
"MobileOptimized": "width",
"apple-mobile-web-app-capable": "yes",
"apple-mobile-web-app-status-bar-style": "black",
"apple-mobile-web-app-title": "App Name",
"application-name": "My App",
"msapplication-TileColor": "#2b5797",
"msapplication-TileImage": "/mstile-144x144.pnga",
"msapplication-config": "/browserconfig.xml",
"og:title": "Page Title",
"og:type": "website",
"og:url": "https://example.com",
"og:image": "https://example.com/image.jpg",
"og:description": "A brief description for social media",
"og:site_name": "Site Name",
"og:locale": "en_US",
"og:video": "https://example.com/video.mp4",
"og:audio": "https://example.com/audio.mp3",
"twitter:card": "summary",
"twitter:site": "@username",
"twitter:creator": "@author",
"twitter:title": "Page Title",
"twitter:description": "A brief description for Twitter",
"twitter:image": "https://example.com/image.jpg",
"twitter:image:alt": "Image description",
"twitter:player": "https://example.com/player",
"twitter:player:width": "480",
"twitter:player:height": "480",
"twitter:app:name:iphone": "App Name",
"twitter:app:id:iphone": "123456789",
"twitter:app:url:iphone": "app://",
"article:published_time": "2024-03-20T12:00:00Z",
"article:modified_time": "2024-03-21T15:30:00Z",
"article:expiration_time": "2024-04-20T12:00:00Z",
"article:author": "John Doe",
"article:section": "Technology",
"article:tag": "Web Development",
"book:author": "Jane Smith",
"book:isbn": "978-3-16-148410-0",
"book:release_date": "2024-01-01",
"book:tag": "Fiction",
"profile:first_name": "John",
"profile:last_name": "Doe",
"profile:username": "johndoe",
"profile:gender": "male",
"music:duration": "180",
"music:album": "Album Name",
"music:album:disc": "1",
"music:album:track": "1",
"music:musician": "Artist Name",
"music:song": "Song Name",
"music:song:disc": "1",
"music:song:track": "1",
"video:actor": "Actor Name",
"video:actor:role": "Character Name",
"video:director": "Director Name",
"video:writer": "Writer Name",
"video:duration": "120",
"video:release_date": "2024-01-01",
"video:tag": "Action",
"video:series": "Series Name"
}

You can preview how your meta tags will appear on different platforms using metatags.io.

Developer ContentReact Components
Built with

Show your support! Star us on GitHub ⭐️