fix(open_graph): remove trailing index.html from url

This commit is contained in:
curben 2019-10-18 02:17:59 +01:00
parent d122f5fa6e
commit d6cccfb940
No known key found for this signature in database
GPG Key ID: 5D9DB57A25D34EE3
1 changed files with 2 additions and 1 deletions

View File

@ -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