Skip to content

Commit 144ef63

Browse files
committed
Gjeninnfører maks lengde, men øker verdien en god del
1 parent af5b7c2 commit 144ef63

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/_common/metatags/HeadWithMetatags.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ type Props = {
1414
children?: React.ReactNode;
1515
};
1616

17+
const descriptionMaxLength = 250;
18+
1719
const getDescription = (content: ContentProps) => {
1820
if (hasMetaDescription(content)) {
1921
return content.data.metaDescription;
@@ -48,7 +50,7 @@ export const getPageTitle = (content: ContentProps) =>
4850

4951
export const HeadWithMetatags = ({ content, children }: Props) => {
5052
const title = getPageTitle(content);
51-
const description = getDescription(content);
53+
const description = getDescription(content).slice(0, descriptionMaxLength);
5254
const url = getCanonicalUrl(content);
5355
const noIndex = shouldNotIndex(content);
5456
const imageUrl = `${appOrigin}/gfx/social-share-fallback.png`;

0 commit comments

Comments
 (0)