Author text variable?!

Hi!

Does anyone have an idea what would be the variable (?) for the author/profile text. The avatar is {{ .Site.Author.avatar }}. Would it be {{ .Site.Author.???) }}.

Any hints in the right direction appreciated.

So, I took a quick look but couldn’t find anything on the Author variable. However, you can get the author’s bio in other ways. A straightforward solution is via the About page:

{{ with .Site.GetPage "/about.md" }}{{ .Content }}{{ end }}

Ah cool! I was just fiddling around with that and it works smoothly! Nice! Thanks a lot!

A variable would be nice though, this way one could have an about page without having that showing up in header (which I where I plan to put that) :rofl:

Haha, yeah, I can see that’s not what you want in some cases. :sweat_smile: Okay, maybe this is more your cup of tea?

{{ $response := getJSON "https://micro.blog/posts/" .Site.Author.username }}
{{ $response._microblog.bio }}

I’m using the official JSON API to fetch the author’s bio. Gets the job done, but a built-in variable would be preferable. What do you think, @manton?

Super nice! Thanks a lot. This works equally well!