How do I add a by line to every post

I’m sure I’ve just missed something stupid. How do I add a by line at the top of every post?

Welcome to the forums @jakeroberts. I’m assuming you mean a by line as in the author of the post?

Yes, exactly. Title, date, by…

Let’s say you had post front matter like this

title: Some Title
date: 2019-04-18
author: John Smith

Then you could do something like this in your template

<h1>{{ .Title }}</h1>
{{ .PublishDate.Format "2006-01-02" }}
{{ }}
1 Like