mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 01:16:28 +03:00
Fix broken social media image (#12137)
This commit is contained in:
parent
dec81508d2
commit
8a3ca77d9e
|
@ -9,6 +9,8 @@ import socialImageLegacy from '../images/social_legacy.jpg'
|
|||
import siteMetadata from '../../meta/site.json'
|
||||
import Head from 'next/head'
|
||||
|
||||
import { siteUrl } from '../../meta/dynamicMeta.mjs'
|
||||
|
||||
function getPageTitle(title, sitename, slogan, sectionTitle, nightly, legacy) {
|
||||
if (sectionTitle && title) {
|
||||
const suffix = nightly ? ' (nightly)' : legacy ? ' (legacy)' : ''
|
||||
|
@ -25,7 +27,7 @@ function getImage(section, nightly, legacy) {
|
|||
if (legacy) return socialImageLegacy
|
||||
if (section === 'api') return socialImageApi
|
||||
if (section === 'universe') return socialImageUniverse
|
||||
return socialImageDefault
|
||||
return `${siteUrl}${socialImageDefault.src}`
|
||||
}
|
||||
|
||||
export default function SEO({
|
||||
|
@ -46,7 +48,7 @@ export default function SEO({
|
|||
nightly,
|
||||
legacy
|
||||
)
|
||||
const socialImage = getImage(section, nightly, legacy).src
|
||||
const socialImage = getImage(section, nightly, legacy)
|
||||
const meta = [
|
||||
{
|
||||
name: 'description',
|
||||
|
|
Loading…
Reference in New Issue
Block a user