Skip to main content
ESC

Get Meta

getMeta generates a metadata object for the current structure (including those automatically generated during initialization).

Metadata Generation 

To collect metadata, Robindoc supports front-matter:

---
title: "Get Meta | Robindoc"
description: "Robindoc AAAAAA"
---

If you do not provide a front-matter title, the first-level heading of the page will be used as the title.

Usage 

getMeta is obtained as a result of initializing Robindoc.

For more details on using the utility in your application, refer to the section App Organization.

You can get the metadata object for a specific page using the following method:

/docs/page.tsx
import { getMeta } from "./robindoc";

export const getPageMetadata = async (pathname: string) => {
const meta = await getMeta(pathname);
return meta;
};

Arguments 

pathname - the full path of the current page (e.g., /docs/02-tools/get-meta) must be provided to obtain the metadata.

Previous
Tools
Next
Get Page Content
Return to navigation