Skip to content

Commit cf2b8a7

Browse files
committed
Fix filepaths for image rendering
1 parent a71c3dd commit cf2b8a7

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

_posts/hello-world.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
title: 'Learn How to Pre-render Pages Using Static Generation with Next.js'
33
excerpt: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Praesent elementum facilisis leo vel fringilla est ullamcorper eget. At imperdiet dui accumsan sit amet nulla facilities morbi tempus.'
4-
coverImage: './assets/blog/hello-world/cover.jpg'
4+
coverImage: '/website/assets/blog/hello-world/cover.jpg'
55
date: '2020-03-16T05:35:07.322Z'
66
author:
77
name: Ratnabali Dutta
8-
picture: './assets/blog/authors/myAvatar.png'
8+
picture: '/website/assets/blog/authors/myAvatar.png'
99
ogImage:
10-
url: './assets/blog/hello-world/cover.jpg'
10+
url: '/website/assets/blog/hello-world/cover.jpg'
1111
---
1212

1313
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Praesent elementum facilisis leo vel fringilla est ullamcorper eget. At imperdiet dui accumsan sit amet nulla facilities morbi tempus. Praesent elementum facilisis leo vel fringilla. Congue mauris rhoncus aenean vel. Egestas sed tempus urna et pharetra pharetra massa massa ultricies.

pages/index.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ const unna = Unna({
1616
preload: true
1717
})
1818

19+
const img_deploy = "website";
20+
const img_local = "";
21+
1922
export default function Home() {
2023
return (
2124
<main className={styles.main}>
@@ -55,14 +58,14 @@ export default function Home() {
5558
<Image
5659
alt="landing_flower"
5760
className={`d-none d-sm-block position-absolute img-fluid ${styles.flow}`}
58-
src="./assets/flower.svg"
61+
src={`./${img_deploy}/assets/flower.svg`}
5962
width="300"
6063
height="300"
6164
/>
6265
<Image
6366
alt="landing_flower"
6467
className={`d-none d-sm-block position-absolute img-fluid ${styles.tflow}`}
65-
src="./assets/tflow.svg"
68+
src={`./${img_deploy}/assets/tflow.svg`}
6669
width="150"
6770
height="150"
6871
/>

0 commit comments

Comments
 (0)