From d79f4537583db1d0e0bb3762add06a1e375463d0 Mon Sep 17 00:00:00 2001 From: Eliot Partridge Date: Fri, 20 Dec 2019 00:00:53 -0600 Subject: [PATCH] Add canonical link for search engine deduplication --- lib/philomena_web/templates/layout/_opengraph.html.slime | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/philomena_web/templates/layout/_opengraph.html.slime b/lib/philomena_web/templates/layout/_opengraph.html.slime index 95167584..b7aa8a79 100644 --- a/lib/philomena_web/templates/layout/_opengraph.html.slime +++ b/lib/philomena_web/templates/layout/_opengraph.html.slime @@ -21,6 +21,8 @@ meta name="robots" content="noindex, nofollow" link rel="alternate" type="application/json+oembed" href=Routes.api_json_oembed_url(@conn, :index, url: Routes.image_path(@conn, :show, image)) title="oEmbed JSON Profile" + link rel="canonical" href=Routes.image_url(@conn, :show, image) + = cond do - image.image_mime_type == "video/webm" and not filtered -> meta property="og:type" content="video.other"