From d6cccfb94056033e391df0c3167aefda62d5eead Mon Sep 17 00:00:00 2001 From: curben <2809763-curben@users.noreply.gitlab.com> Date: Fri, 18 Oct 2019 02:17:59 +0100 Subject: [PATCH] fix(open_graph): remove trailing index.html from url --- themes/chameleon/scripts/openGraph.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/themes/chameleon/scripts/openGraph.js b/themes/chameleon/scripts/openGraph.js index 7e61770..8de956e 100644 --- a/themes/chameleon/scripts/openGraph.js +++ b/themes/chameleon/scripts/openGraph.js @@ -37,7 +37,8 @@ function openGraphHelper () { const keywords = page.tags || false const title = page.title || theme.nickname const type = (this.is_post() ? 'article' : 'website') - const url = encodeURL(this.url) + const url = config.pretty_urls.trailing_index ? encodeURL(this.url) + : encodeURL(this.url).replace(/index\.html$/, '') const siteName = config.subtitle || theme.nickname || false const published = page.date || false const updated = page.lastUpdated || false