From 10a29f053f21a66de097c12eb97844adeaa89626 Mon Sep 17 00:00:00 2001 From: Yuri Pieters Date: Sun, 11 Jun 2023 16:21:41 +0100 Subject: [PATCH] Set html lang attr to the interface language --- src/server/index.tsx | 2 +- src/shared/components/common/html-tags.tsx | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/server/index.tsx b/src/server/index.tsx index 1fab13d..b7f4fb5 100644 --- a/src/server/index.tsx +++ b/src/server/index.tsx @@ -346,7 +346,7 @@ async function createSsrHtml(root: string, isoData: IsoDataOptionalSite) { return ` - + diff --git a/src/shared/components/common/html-tags.tsx b/src/shared/components/common/html-tags.tsx index 4c673d9..0e6cb2d 100644 --- a/src/shared/components/common/html-tags.tsx +++ b/src/shared/components/common/html-tags.tsx @@ -2,7 +2,7 @@ import { htmlToText } from "html-to-text"; import { Component } from "inferno"; import { Helmet } from "inferno-helmet"; import { httpExternalPath } from "../../env"; -import { md } from "../../utils"; +import { getLanguages, md } from "../../utils"; interface HtmlTagsProps { title: string; @@ -17,9 +17,12 @@ export class HtmlTags extends Component { const url = httpExternalPath(this.props.path); const desc = this.props.description; const image = this.props.image; + const lang = getLanguages()[0]; return ( + + {["title", "og:title", "twitter:title"].map(t => ( ))} -- 2.44.1