Tiramisu Docs

Integrations

SEO

Built-in sitemap, canonical URLs, Open Graph tags, and JSON-LD structured data for search engines.

Tiramisu Docs includes built-in SEO features to help your documentation rank well in search engines.

Sitemap

A sitemap is automatically generated at /sitemap.xml. It includes all documentation pages with their last-edited dates.

To enable the sitemap, set the url field in your config:

typescript
export default defineConfig({
  url: "https://docs.example.com",
  // ...
});

The url is required for generating absolute URLs in the sitemap.

Meta Tags

Each documentation page automatically gets meta tags derived from its meta {} block:

Open Graph

  • og:title — from the page title
  • og:description — from the page description
  • og:type — always article
  • og:url — canonical URL built from your site url and the page slug
  • og:site_name — from the title in your config
  • og:image — from the image field in the page meta

Twitter Cards

  • twitter:cardsummary_large_image when an image is set, otherwise summary
  • twitter:title — from the page title
  • twitter:description — from the page description
  • twitter:image — from the image field in the page meta

OG Image

You can set an Open Graph image per page using the image field in the page's meta {} block:

tiramisu
meta {
  title = Getting Started,
  description = Learn how to get started,
  image = /images/getting-started.png
}

The image path can be relative to your site root (e.g. /images/hero.png) or an absolute URL (e.g. https://example.com/og.png). Relative paths are resolved against your site url.

Canonical URL

A <link rel=canonical> tag is added to each page when a site url is configured. This helps search engines identify the preferred URL for each page.

JSON-LD Structured Data

Each page includes a TechArticle JSON-LD schema with:

  • headline — the page title
  • url — the canonical page URL
  • mainEntityOfPage — a WebPage reference
  • isPartOf — a WebSite reference with your site name and URL
  • description — if a description is set in the page meta
  • dateModified — if last-edited tracking is enabled
  • image — if an image is set in the page meta
  • author — if an author is set in the page meta (as a Person entity)

All of these tags are generated automatically. You only need to set url and title in your config and add title and description to each page's meta {} block.

Customizing the Sitemap

The sitemap route is included automatically when you scaffold a project. If you need to customize it, the generated route is at src/routes/sitemap.xml/+server.ts and uses the generateSitemap() function from the kit.