Skip to content

Commit 4690be8

Browse files
committed
Modify images to use env path
1 parent 00c6499 commit 4690be8

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

next.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/** @type {import('next').NextConfig} */
22
const nextConfig = {
33
output: "export",
4-
basePath: "/brno.python.pizza",
4+
basePath: process.env.BASE_PATH,
55
};
66
module.exports = nextConfig;

src/components/image.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export const Image: React.FC<Props> = ({
3232

3333
return (
3434
<img
35-
src={src}
35+
src={`${process.env.BASE_PATH}/${src}`}
3636
alt={alt}
3737
sx={{ width: finalWidth, height: finalHeight, objectFit }}
3838
className={className}

src/sections/hero.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export const Hero = () => (
3131
flexDirection: "column",
3232
alignItems: "center",
3333
justifyContent: "center",
34-
background: "url(/background.jpg) center / cover",
34+
background: `url(${process.env.BASE_PATH}/background.jpg) center / cover`,
3535
minHeight: "100vh",
3636
position: "relative",
3737
pt: ["42rem", "20rem", "14rem"],

0 commit comments

Comments
 (0)