Metadata API
Define metadata for pages, collections, and navigation.
Metadata API
Place TypeScript files alongside Markdown to define page and navigation information with type safety.
Page metadata
import { definePageMetadata } from "@natsuneko-laboratory/makit/metadata";
export default definePageMetadata({
id: "guides.configuration",
title: "Configuration",
description: "Configure the entire site.",
order: 1,
});
The main properties are:
id: a stable identifier for translations and linkstitle: a title used in navigation and page headingsdescription: a description for SEO and summary displaysslug: an explicit URL path segmentorder: display order among siblings; it takes precedence over filename prefixes
Collections
import { defineCollection } from "@natsuneko-laboratory/makit/metadata";
export default defineCollection({
id: "makit",
title: "Makit",
description: "Makit documentation",
path: "/makit",
});
Automatic and manual navigation
Without special configuration, Makit generates navigation from the file structure. For detailed control in a large site, define it explicitly with navigation.makit.ts and defineNavigation.