Custom content summary

Hello! I want to show a custom summary. So I add another key to post file:

title: "Hello World"

date: 2018-09-12T08:00:31+01:00

draft: true

summary: "Summary..."


You’ll find this post in your `content/posts` directory. 

In layouts/list.html,
{{ .Summary }}
And what I get is this

I want to get summary content.
Thank you in advance.

.Summary is a page variable, and you can read up on how to use content summaries. If you want to create your own, go with user-defined variables in front matter.


Thank you for your time :sunglasses:

1 Like