From 5757eb7036bc8928ff5713618c38d90323844dba Mon Sep 17 00:00:00 2001 From: infinite-persistence Date: Mon, 4 Oct 2021 10:24:53 +0800 Subject: [PATCH] OG: fix url for categories ## Issue Category cards are showing up as "odysee.com" cards in Facebook. ## Change - `og:url` is supposed to be the canonical URL. It was hardcoded to "odysee.com", so every category was being redirected when the card is being generated. - Removed `twitter:url`. The documentation says it will fall back to `og:url`, so there is not need to define both if it's the same. --- web/src/html.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/src/html.js b/web/src/html.js index 3cecfe259..8367814cb 100644 --- a/web/src/html.js +++ b/web/src/html.js @@ -74,12 +74,12 @@ function getCategoryMeta(path) { // Normal metadata with option to override certain values // function buildOgMetadata(overrideOptions = {}) { - const { title, description, image } = overrideOptions; + const { title, description, image, path } = overrideOptions; const cleanDescription = removeMd(description || SITE_DESCRIPTION); const head = `${SITE_TITLE}\n` + `\n` + - `\n` + + `\n` + `\n` + `\n` + `\n` + @@ -91,7 +91,6 @@ function buildOgMetadata(overrideOptions = {}) { }" />\n` + `\n` + `\n` + - `\n` + '\n' + `` + `