import { Component } from "inferno";
import { Helmet } from "inferno-helmet";
import { httpExternalPath } from "../../env";
+import { i18n } from "../../i18next";
import { md } from "../../utils";
-
interface HtmlTagsProps {
title: string;
path: string;
/// Taken from https://metatags.io/
export class HtmlTags extends Component<HtmlTagsProps, any> {
render() {
- let url = httpExternalPath(this.props.path);
- let desc = this.props.description;
- let image = this.props.image;
+ const url = httpExternalPath(this.props.path);
+ const desc = this.props.description;
+ const image = this.props.image;
return (
<Helmet title={this.props.title}>
+ <html lang={i18n.resolvedLanguage} />
+
{["title", "og:title", "twitter:title"].map(t => (
<meta key={t} property={t} content={this.props.title} />
))}