Skip to content

Commit 67d51d5

Browse files
committed
docs: update preview image's font-matter
1 parent 9cefe58 commit 67d51d5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

_posts/2019-08-08-text-and-typography.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ tags: [typography]
99
math: true
1010
mermaid: true
1111
image:
12-
src: /commons/devices-mockup.png
12+
path: /commons/devices-mockup.png
1313
width: 800
1414
height: 500
1515
---

_posts/2019-08-08-write-a-new-post.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,12 +221,12 @@ The output will be:
221221

222222
### Preview Image
223223

224-
If you want to add an image to the top of the post contents, specify the attribute `src`, `width`, `height`, and `alt` for the image:
224+
If you want to add an image to the top of the post contents, specify the attribute `path`, `width`, `height`, and `alt` for the image:
225225

226226
```yaml
227227
---
228228
image:
229-
src: /path/to/image/file
229+
path: /path/to/image/file
230230
width: 1000 # in pixels
231231
height: 400 # in pixels
232232
alt: image alternative text
@@ -235,7 +235,7 @@ image:
235235

236236
Except for `alt`, all other options are necessary, especially the `width` and `height`, which are related to user experience and web page loading performance. The above section "[Size](#size)" also mentions this.
237237

238-
Starting from _Chirpy v5.0.0_, the attributes `height` and `width` can be abbreviated: `height` → `h`, `width` → `w`. In addition, the [`img_path`](#image-path) can also be passed to the preview image, that is, when it has been set, the attribute `src` only needs the image file name.
238+
Starting from _Chirpy v5.0.0_, the attributes `height` and `width` can be abbreviated: `height` → `h`, `width` → `w`. In addition, the [`img_path`](#image-path) can also be passed to the preview image, that is, when it has been set, the attribute `path` only needs the image file name.
239239

240240
## Pinned Posts
241241

0 commit comments

Comments
 (0)