X-Git-Url: http://these/git/?a=blobdiff_plain;f=src%2Fshared%2Fcomponents%2Fcommon%2Fhtml-tags.tsx;h=80649fa119e85cfa8e0214065aeeaad2edf45a47;hb=53c3cfeade90150b07431386745a24aa699a25ec;hp=0e6cb2d03ad381528ed3f78447e0c0bc18d2b1bf;hpb=05aa483d899f83b231259fd0072c243c6567b922;p=lemmy-ui.git
diff --git a/src/shared/components/common/html-tags.tsx b/src/shared/components/common/html-tags.tsx
index 0e6cb2d..80649fa 100644
--- a/src/shared/components/common/html-tags.tsx
+++ b/src/shared/components/common/html-tags.tsx
@@ -1,12 +1,14 @@
+import { httpExternalPath } from "@utils/env";
import { htmlToText } from "html-to-text";
import { Component } from "inferno";
import { Helmet } from "inferno-helmet";
-import { httpExternalPath } from "../../env";
-import { getLanguages, md } from "../../utils";
+import { md } from "../../markdown";
+import { I18NextService } from "../../services";
interface HtmlTagsProps {
title: string;
path: string;
+ canonicalPath?: string;
description?: string;
image?: string;
}
@@ -15,13 +17,14 @@ interface HtmlTagsProps {
export class HtmlTags extends Component {
render() {
const url = httpExternalPath(this.props.path);
+ const canonicalUrl =
+ this.props.canonicalPath ?? 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 => (
@@ -30,6 +33,8 @@ export class HtmlTags extends Component {
))}
+
+
{/* Open Graph / Facebook */}