ENGLISH·COURSE API
    Preparing search index...
    • Composes the metadata a single route publishes about itself.

      Parameters

      Returns Metadata

      A Next Metadata object with canonical, alternates, Open Graph and Twitter composed

      One builder rather than four copies inside each generateMetadata. Head tags render invisibly, so a page that quietly lost its og:locale:alternate would go unnoticed for as long as nobody inspected it — centralising the shape means there is exactly one implementation to test.

      twitter:site and twitter:creator are deliberately absent: there is no account, and an empty handle carries no information.

      The image URL is the route's own opengraph-image convention path, declared relative so metadataBase absolutizes it.

      return shareMetadata({
      locale,
      href: `/courses/${course.slug}`,
      title: course.title,
      description: t("courseDescription", { … }),
      siteName: t("siteName"),
      imageAlt: t("imageAlt", { title: course.title }),
      });

      If locale is not one of the application's supported locales