Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ <h1 data-toc-skip>{{ page.title }}</h1>
</span>
{% endif %}

{% if page.image %}
{% if page.image and page.image.post != false %}
{% capture src %}src="{{ page.image.path | default: page.image }}"{% endcapture %}
{% capture class %}class="preview-img{% if page.image.no_bg %}{{ ' no-bg' }}{% endif %}"{% endcapture %}
{% capture alt %}alt="{{ page.image.alt | xml_escape | default: "Preview Image" }}"{% endcapture %}
Expand Down
23 changes: 23 additions & 0 deletions _posts/2019-08-08-write-a-new-post.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,29 @@ toc: false
---
```

## Image

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:

```yaml
---
image:
path: /path/to/image.jpeg
alt: this is some alt text
---
```

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.

```yaml
---
image:
path: /path/to/image.jpeg
alt: this is some alt text
post: false
---
```

## Comments

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.
Expand Down