- Page Titles and Metadata
Each page is an MDX file that should begin with the following metadata syntax with
--- at the start and end:
--- title: [title of the page] ---
Other metadata goes in between the same
--- lines. For example, this page uses this metadata:
--- title: "Page Titles and Metadata" description: "Metadata is important for API pages and SEO optimization" ---
API pages let you build interactive API playgrounds. To create an API page, you must set an
openapi property in the page metadata.
Learn more about API playgrounds in our demo.
api or openapi: [method] [endpoint]
You can show a description that shows directly under the title with the
description: "Your description goes here."
You can show a different title in the navigation with the
sidebarTitle metadata. This is useful if your title is long and you want something shorter in the navigation links.
--- title: "Your very long page title you want to shorten" sidebarTitle: "Short title" ---
You can hide the headings preview on the right side of the page. This is useful if you don’t have any headings, or you want to take advantage of the extra horizontal space.
--- title: "Your page with no headings" mode: "wide" ---
Search Engine Optimization
You can set meta tags like the image set when shared on social media by passing them into your page’s metadata. Meta tags with colons need to be wrapped in quotes.
See our SEO page for all supported meta tags.