Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit e25323f

Browse files
committed
Change environment variable for publicUrl to use app.config
1 parent 0fa6ceb commit e25323f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/pages/_document.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import Document, { Html, Head, Main, NextScript } from 'next/document';
22
import { ServerStyleSheet } from 'styled-components';
33
import { ServerStyleSheets } from '@material-ui/core';
4+
import { getAppConfigValue } from '@util/getAppConfigValue';
45

56
export default class MyDocument extends Document {
67
static async getInitialProps(ctx) {
@@ -39,7 +40,7 @@ export default class MyDocument extends Document {
3940
<meta charSet="utf-8" />
4041
<meta
4142
property="og:image"
42-
content={`${process.env.NEXT_PUBLIC_URL}/ogimage.png`}
43+
content={`${getAppConfigValue('publicUrl')}/ogimage.png`}
4344
/>
4445
<link rel="preconnect" href="https://fonts.gstatic.com" />
4546
<link

0 commit comments

Comments
 (0)