How to add images to a post
To include images in a post, the post file name must be index.md
.
First declare the image resources in the meta section as following:
resources:
- src: "**.{png,jpg}"
title: "Image #:counter"
Then declare the image detail in the post:
{{< imgproc sunset Fill "600x300" >}}
{{< /imgproc >}}
The first parameter of imgproc
such as sunset
or featured-test-get.png
is an RegEx pattern which can identify the image.
Here’s an image (
featured-sunset-get.png
) in the folder where index.md
is.
And here’s an another image (
featured-test-get.png
) in the images subfolder.