Skip to content

Commit

Permalink
site: Fix open graph image urls (#974)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeltaranto committed Jan 23, 2023
1 parent 3440f82 commit 3d1e978
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions site/src/render.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ const render = (route: string, headTags: HeadTags) =>
</StaticRouter>,
);

const prodUrl = 'https://vanilla-extract.style';
const devUrl = 'http://localhost:8080';
const fullyQualifiedUrl = (path: string) =>
`${process.env.URL || 'http://localhost:8080'}${path}`;
`${process.env.CI ? prodUrl : devUrl}${path}`;

interface RenderParams {
route: string;
Expand Down Expand Up @@ -71,9 +73,7 @@ export default ({ route, publicPath, entrypoints }: RenderParams) => {
<meta name="theme-color" content="#fff"/>
<link rel="manifest" href="${assetPath('site.webmanifest')}"/>
<link rel="apple-touch-icon" href="${assetPath('apple-touch-icon.png')}"/>
<link rel="canonical" href="https://vanilla-extract.style${
route || '/'
}" />
<link rel="canonical" href="${fullyQualifiedUrl(route || '/')}" />
${favicon(16)}
${favicon(32)}
${favicon()}
Expand Down

0 comments on commit 3d1e978

Please sign in to comment.