ENGLISH·COURSE API
    Preparing search index...

    Everything a route knows about itself that its metadata needs.

    href is the route's path without a locale prefix (/courses/basic-course); the locale set and the default locale come from the routing configuration, so adding or removing a locale needs no per-page edit.

    There is no siteUrl field: the URLs here stay relative and Next absolutizes them against the layout's metadataBase. Passing the origin down to every route would give two places for it to be wrong.

    type ShareMetadataInput = {
        locale: string;
        href: string;
        title: string;
        description: string;
        siteName: string;
        imageAlt: string;
        videoDurationSeconds?: number;
    }
    Index

    Properties

    locale: string

    The locale this render is being served in, as the route params carry it. Narrowed here rather than at four call sites, each of which would otherwise need the same cast from string.

    href: string

    Unprefixed path of the route, e.g. /courses/basic-course.

    title: string

    What this route is called — not what the site is called.

    description: string

    What this route is about — not what the site is about.

    siteName: string

    The brand, identical in every locale.

    imageAlt: string

    Localized alt text for this route's generated sharing image.

    videoDurationSeconds?: number

    Present only for a video lesson; drives og:type and og:video:duration.