Skip to content

Commit 3fee0d7

Browse files
committed
docs(images): add documentation for image field
1 parent 48cb698 commit 3fee0d7

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

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

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,29 @@ toc: false
9595
---
9696
```
9797

98+
## Image
99+
100+
To add an image to the post so that it shows on the preview, embeds, and beginning of the post itself, you can specify the `image` field in the _Front Matter_ as follows:
101+
102+
```yaml
103+
---
104+
image:
105+
path: /path/to/image.jpeg
106+
alt: this is some alt text
107+
---
108+
```
109+
110+
You can also use the `post` subfield if you only want the image to show up in the preview and embeds, and *not* in the post.
111+
112+
```yaml
113+
---
114+
image:
115+
path: /path/to/image.jpeg
116+
alt: this is some alt text
117+
post: false
118+
---
119+
```
120+
98121
## Comments
99122

100123
The global setting for comments is defined by the `comments.provider` option in the `_config.yml`{: .filepath} file. Once a comment system is selected for this variable, comments will be enabled for all posts.

0 commit comments

Comments
 (0)