Skip to content

Commit

Permalink
fix(fiches-mt): modication de la canonical (#6306)
Browse files Browse the repository at this point in the history
* fix: modif

* fix: modif

* fix: modif
  • Loading branch information
maxgfr authored Nov 18, 2024
1 parent cd3c4ea commit cf296a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ import { generateDefaultMetadata } from "../../../src/modules/common/metas";
import { fetchFicheMT } from "../../../src/modules/fiche-ministere-travail/queries";
import { FicheMinistereTravail } from "../../../src/modules/fiche-ministere-travail/ficheMinistereTravail";
import { fetchRelatedItems } from "../../../src/modules/documents";
import { getRouteBySource, SOURCES } from "@socialgouv/cdtn-utils";

export async function generateMetadata({ params }) {
const { title, description } = await getFiche(params.slug);
const { title, description, url } = await getFiche(params.slug);

return generateDefaultMetadata({
title: title,
description: description,
path: `/${getRouteBySource(SOURCES.SHEET_MT)}/${params.slug}`,
overrideCanonical: url,
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Metadata } from "next/types";
type Props = {
title: string;
description: string;
path: string;
path?: string;
overrideCanonical?: string;
noTitleAdd?: boolean;
};
Expand Down

0 comments on commit cf296a8

Please sign in to comment.