Welcome to mirror list, hosted at ThFree Co, Russian Federation.

post-with-featured-image.md « blog « content « exampleSite - github.com/siegerts/hugo-theme-basic.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c42ff5c2ff82d799becb4bae87be72905f3fa985 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
---
title: "Post With Featured Image"
date: 2018-10-01T16:15:09+08:00
draft: false
images: 
  - https://picsum.photos/1024/768/?random
tags: 
  - Demo
  - Image
---

Just define the image URL in the content’s front matter, the featured image will be displayed as the background. 

For example:

```yaml
---
images:
  - https://picsum.photos/1024/768/?random
---
```

This is an array, you can set multiple urls, only the first url will be used. These images is also used in [Twitter Cards](https://developer.twitter.com/en/docs/tweets/optimize-with-cards/guides/getting-started.html) and the [Open Graph](http://ogp.me/) metadata.