Skip to content

Commit

Permalink
🐛 Fix urls in meta
Browse files Browse the repository at this point in the history
  • Loading branch information
pouretrebelle committed Feb 12, 2023
1 parent 987eb59 commit e6b089e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Navigation from 'components/Navigation'
import Footer from 'components/Footer'
import { StarSymbols } from 'components/icons/StarIcon'

const ROOT_URL = process.env.GATSBY_ROOT_URL || 'https://chareads.com'
const ROOT_URL = process.env.GATSBY_ROOT_URL

const StyledLayout = styled.div`
display: flex;
Expand Down Expand Up @@ -55,7 +55,7 @@ const Layout: React.FC<Props> = ({
}
`)

const url = `${ROOT_URL}${location.pathname}`
const url = `//${ROOT_URL}${location.pathname}`
const title = `${customTitle ? `${customTitle} | ` : ''}Chareads`
const description =
customDescription ||
Expand All @@ -68,15 +68,14 @@ const Layout: React.FC<Props> = ({
fit: 'cover',
})
}`
const favicon = `${ROOT_URL}/favicon.png`

return (
<>
<Helmet>
<title>{title}</title>
<meta property="og:title" content={title} />
<meta name="twitter:title" content={title} />
<link rel="shortcut icon" href={favicon} />
<link rel="shortcut icon" href={`//${ROOT_URL}/favicon.png`} />
<link rel="canonical" href={url} />
<meta property="og:url" content={url} />
<meta name="description" content={description} />
Expand Down

0 comments on commit e6b089e

Please sign in to comment.