UNPKG

@bgscore/react-router

Version:

Automatic React Router generator for Vite with TypeScript support

19 lines (18 loc) 1.08 kB
import { Metadata } from "./metadata"; /** * Custom hook to manage document metadata * * @param {Metadata} metadata - The metadata object containing information to be set in the document head. * @param {string | null | undefined} templateTitle - A template string to be appended to the title. * * The `metadata` object can have the following properties: * - `title`: The title of the document. * - `templateTitle`: A template string to be appended to the title. * - `description`: A description of the document. * - `applicationName`: The name of the application. * - `keywords`: An array of keywords related to the document. * - `robots`: An object or string specifying the robots meta tag content. * - `authors`: An array of author objects, each containing `name` and optionally `url`. * - `openGraph`: An object containing Open Graph metadata. */ export default function useMetadata(metadata: Omit<Metadata, 'independent' | 'layout' | 'handle' | 'loader' | 'errorElement'>, templateTitle?: string | null | undefined | boolean, sparatorTitle?: string): void;