# Help with author pages

**URL:** <https://discourse.gohugo.io/t/help-with-author-pages/7255>\
**Category:** support\
**Created:** [June 29, 2017, 6:05pm UTC](https://discourse.gohugo.io/t/help-with-author-pages/7255 "2017-06-29T18:05:23Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alan\_Roy](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@Alan\_Roy](https://discourse.gohugo.io/u/Alan_Roy)\
**Post date:** [June 29, 2017, 6:05pm UTC](https://discourse.gohugo.io/t/help-with-author-pages/7255/1 "2017-06-29T18:05:23Z")

</div>

hey guys, new to Hugo but loving it so far. I noticed the new docs (which were much easier to learn from) were taken down recently. Any way to see them again?

Also, I am trying to figure out how to achieve an author landing page with a collection of all that author’s posts in Hugo (like this - [https://next.smashingmagazine.com/author/vitaly-friedman/](https://next.smashingmagazine.com/author/vitaly-friedman/) )

I have no idea where to begin - Is this a custom taxonomy, or a new type of “post” page? Any code examples would be super helpful. I’d also want to generate a list of authors on the sidebar with photos

---

<div class="post-metadata">

**Author:** ![Jonathan\_Griffin](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jonathan_griffin/32/8355_2.png) [@Jonathan\_Griffin](https://discourse.gohugo.io/u/Jonathan_Griffin)\
**Post date:** [June 29, 2017, 6:18pm UTC](https://discourse.gohugo.io/t/help-with-author-pages/7255/2 "2017-06-29T18:18:28Z")

</div>

I haven’t really looked at this (only started a few weeks ago myself), but I guess one way would be to create an author taxonomy, and then assign an author on each post that way. You could then create an \_index.md file for each taxonomy entry to add author bio details to the page \ style as appropriate in the taxonomy.html file.

There seems to be a longer discussion here about it: [[SOLVED] Multiple Authors w/ Own Article List (site.com/authors/author-name/article.md)](https://discourse.gohugo.io/t/solved-multiple-authors-w-own-article-list-site-com-authors-author-name-article-md/5837)

Would be interested for other opinions on this, but a few searches seem to only reveal the above.

---

<div class="post-metadata">

**Author:** ![Alan\_Roy](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@Alan\_Roy](https://discourse.gohugo.io/u/Alan_Roy)\
**Post date:** [June 29, 2017, 6:21pm UTC](https://discourse.gohugo.io/t/help-with-author-pages/7255/3 "2017-06-29T18:21:41Z")

</div>

Awesome, I’ll start here! Thanks 🙂

---

<div class="post-metadata">

**Author:** ![Jonathan\_Griffin](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jonathan_griffin/32/8355_2.png) [@Jonathan\_Griffin](https://discourse.gohugo.io/u/Jonathan_Griffin)\
**Post date:** [June 29, 2017, 6:28pm UTC](https://discourse.gohugo.io/t/help-with-author-pages/7255/4 "2017-06-29T18:28:31Z")

</div>

Yeh, I am not so sure I would follow the ideas in that link I posted (after re-reading it, it seems more complicated). I think my suggestion is a simple one, and the direction I would probably go if I was to implement.

Happy for others to chime in on their recommendations though.

---

<div class="post-metadata">

**Author:** ![Alan\_Roy](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@Alan\_Roy](https://discourse.gohugo.io/u/Alan_Roy)\
**Post date:** [June 29, 2017, 6:33pm UTC](https://discourse.gohugo.io/t/help-with-author-pages/7255/5 "2017-06-29T18:33:53Z")

</div>

Hm, if you have a little bit of time, can you give me a basic code example of your suggestions?

I suppose I’d want to define the author of a post on the frontmatter. Where would I place the \_index.md for each author’s custom bio? Would it be layout/authors/joe/\_index.md?

---

<div class="post-metadata">

**Author:** ![Jonathan\_Griffin](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jonathan_griffin/32/8355_2.png) [@Jonathan\_Griffin](https://discourse.gohugo.io/u/Jonathan_Griffin)\
**Post date:** [June 29, 2017, 6:36pm UTC](https://discourse.gohugo.io/t/help-with-author-pages/7255/6 "2017-06-29T18:36:24Z")

</div>

Sorry, I am short of time to build anything out for you.

However, treat the author exactly like a category - samples found in this section: [http://gohugo.io/taxonomies/overview/](http://gohugo.io/taxonomies/overview/)

Yes, you have the correct place for _[index.md](http://index.md) (note the "_" ) and you will need to create the directory.

Hope that helps.

Edit- forums seem to strip out the underscore.

---

<div class="post-metadata">

**Author:** ![Alan\_Roy](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@Alan\_Roy](https://discourse.gohugo.io/u/Alan_Roy)\
**Post date:** [June 29, 2017, 6:41pm UTC](https://discourse.gohugo.io/t/help-with-author-pages/7255/7 "2017-06-29T18:41:17Z")

</div>

Thanks Jonathan. Will respond if I have additional questions. Appreciate the support 🙂

---

<div class="post-metadata">

**Author:** ![Jonathan\_Griffin](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jonathan_griffin/32/8355_2.png) [@Jonathan\_Griffin](https://discourse.gohugo.io/u/Jonathan_Griffin)\
**Post date:** [June 29, 2017, 7:06pm UTC](https://discourse.gohugo.io/t/help-with-author-pages/7255/8 "2017-06-29T19:06:07Z")

</div>

Yeh, one thing I haven’t thought about is displaying author bio details (apart from the name) on the article page itself, and where my knowledge gets a little sketchy (i.e. it would take me a bit of time to work out).

---

<div class="post-metadata">

**Author:** ![Alan\_Roy](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@Alan\_Roy](https://discourse.gohugo.io/u/Alan_Roy)\
**Post date:** [June 29, 2017, 7:09pm UTC](https://discourse.gohugo.io/t/help-with-author-pages/7255/9 "2017-06-29T19:09:09Z")

</div>

yeah, what I have so far is I can display the author’s name on the article, and on the sidebar, I can display all authors (just their name). I have to figure out how to display their photos. Also, \_index.md doesn’t seem to be working for me. Not sure if I have it in the right place or missing some context, but just putting random words in \_index.md for “joe” doesn’t show up.

---

<div class="post-metadata">

**Author:** ![Jonathan\_Griffin](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jonathan_griffin/32/8355_2.png) [@Jonathan\_Griffin](https://discourse.gohugo.io/u/Jonathan_Griffin)\
**Post date:** [June 29, 2017, 7:17pm UTC](https://discourse.gohugo.io/t/help-with-author-pages/7255/10 "2017-06-29T19:17:35Z")

</div>

I think you have to define fields in the front matter of the \_index.md, and reference those fields in the templates specifically. I know this works, as I have utilized this myself for other things.

---

<div class="post-metadata">

**Author:** ![Jonathan\_Griffin](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jonathan_griffin/32/8355_2.png) [@Jonathan\_Griffin](https://discourse.gohugo.io/u/Jonathan_Griffin)\
**Post date:** [June 29, 2017, 7:20pm UTC](https://discourse.gohugo.io/t/help-with-author-pages/7255/11 "2017-06-29T19:20:49Z")

</div>

I think what I am going to do is to create a new repo over the weekend, and see if I can build something out.

My knowledge is lacking a little to advise off the top of my head. I will try and post the public repo when I am done. This is something I ought to implement myself anyway.

---

<div class="post-metadata">

**Author:** ![Alan\_Roy](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@Alan\_Roy](https://discourse.gohugo.io/u/Alan_Roy)\
**Post date:** [June 29, 2017, 7:22pm UTC](https://discourse.gohugo.io/t/help-with-author-pages/7255/12 "2017-06-29T19:22:09Z")

</div>

Thanks Jonathan! I’ll keep digging in the meantime but would love to see a working implementation

---

<div class="post-metadata">

**Author:** ![Jonathan\_Griffin](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jonathan_griffin/32/8355_2.png) [@Jonathan\_Griffin](https://discourse.gohugo.io/u/Jonathan_Griffin)\
**Post date:** [June 29, 2017, 7:53pm UTC](https://discourse.gohugo.io/t/help-with-author-pages/7255/13 "2017-06-29T19:53:39Z")

</div>

I just noticed on the post I linked in my first reply that rdwatters had the same idea (I didn’t quite read the last few entries 😏 )[quote=“rdwatters, post:15, topic:5837”]  
why not keep it simple and create an author taxonomy, add one (or more) authors in your front matter, and then if you want to add content/metadata for any individual author, you do so using an \_index.md file in taxonomy/author folder. Then you don’t need to use a data file or create these complex partials.

I think the big shift is the addition of the \_index.md (note the underscore is important!) since you and I last chatted on here a few versions back with Hugo.  
[/quote]

So I think we are on the right lines, just need to work out how to access the front matter in the \_index.md file in this scenario.

---

<div class="post-metadata">

**Author:** ![Alan\_Roy](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@Alan\_Roy](https://discourse.gohugo.io/u/Alan_Roy)\
**Post date:** [June 29, 2017, 8:00pm UTC](https://discourse.gohugo.io/t/help-with-author-pages/7255/14 "2017-06-29T20:00:57Z")

</div>

Yeah, that’s the approach I’m trying to take. I made the taxonomy, added the authors to the frontmatter, and that’s working. the \_index.md stuff worked by adding {{.content}} to the layouts/post/\_index.md, but with the custom taxonomy (/layout/taxonomy/something) it doesn’t seem to be working just yet.

---

<div class="post-metadata">

**Author:** ![Jonathan\_Griffin](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jonathan_griffin/32/8355_2.png) [@Jonathan\_Griffin](https://discourse.gohugo.io/u/Jonathan_Griffin)\
**Post date:** [June 29, 2017, 8:26pm UTC](https://discourse.gohugo.io/t/help-with-author-pages/7255/15 "2017-06-29T20:26:41Z")

</div>

Try this in your template:

```
 {{ range .Params.categories }}
 {{$.Params.frontmattervariable}}
 {{ end }}

```

Obviously replacing categories with author or whatever. Please let me know if it works for you. I think it will do it.

---

<div class="post-metadata">

**Author:** ![Alan\_Roy](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@Alan\_Roy](https://discourse.gohugo.io/u/Alan_Roy)\
**Post date:** [June 29, 2017, 8:32pm UTC](https://discourse.gohugo.io/t/help-with-author-pages/7255/16 "2017-06-29T20:32:44Z")

</div>

I think my problem is that I might be placing something in the wrong place, because neither the \_index.md or the /layouts/taxonomy/alan.html is doing anything.

Looking at the hugo docs, I think I am doing this but no luck

 ![](https://canada1.discourse-cdn.com/flex036/uploads/gohugo/original/2X/c/cdb993c673a571a53ea4e9940e7869e9da2d22b9.png)

Can you be very explicit with the paths I should be using for the \_index.md and the template inside /layouts for adding additional stuff on top of an “alan” author?

---

<div class="post-metadata">

**Author:** ![Jonathan\_Griffin](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jonathan_griffin/32/8355_2.png) [@Jonathan\_Griffin](https://discourse.gohugo.io/u/Jonathan_Griffin)\
**Post date:** [June 29, 2017, 8:37pm UTC](https://discourse.gohugo.io/t/help-with-author-pages/7255/17 "2017-06-29T20:37:15Z")

</div>

content/authors/alan-roy/\_index.md

For now, alter the single.html and add the following code somewhere:

```
 {{ range .Params.authors }}
 {{$.Params.bio}} // bio is a frontmatter variable in the author taxonomy _index.md
 {{ end }}

```

(note if you just have \_default layouts, change that single.html, otherwise alter the correct one for the content type.)

The code I mentioned adds the bio to the articles only, where that author has been assigned.

Also update your config.toml to add the author category:

[taxonomies]  
tag = ""  
category = "categories"  
author = “authors”

Please let me know if that is not clear, and I will try to clarify further.

---

<div class="post-metadata">

**Author:** ![Jonathan\_Griffin](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jonathan_griffin/32/8355_2.png) [@Jonathan\_Griffin](https://discourse.gohugo.io/u/Jonathan_Griffin)\
**Post date:** [June 29, 2017, 8:41pm UTC](https://discourse.gohugo.io/t/help-with-author-pages/7255/18 "2017-06-29T20:41:54Z")

</div>

I just updated the [index.md](http://index.md) location in the preceding post (missed the s off).

---

<div class="post-metadata">

**Author:** ![Jonathan\_Griffin](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jonathan_griffin/32/8355_2.png) [@Jonathan\_Griffin](https://discourse.gohugo.io/u/Jonathan_Griffin)\
**Post date:** [June 29, 2017, 8:48pm UTC](https://discourse.gohugo.io/t/help-with-author-pages/7255/19 "2017-06-29T20:48:09Z")

</div>

FOr the taxoonomy page (i.e author page for each individual author), I have only so far updated the taxonomy.html in the \_default.

This won’t really be a good idea for an author, as it will need to be unique (i.e. not change your usual category pages).

According to the docs: [https://gohugo.io/templates/list/](https://gohugo.io/templates/list/)

/layouts/taxonomy/SINGULAR.html (e.g. /layouts/taxonomy/topic.html)  
/layouts/\_default/taxonomy.html  
/layouts/\_default/list.html  
/themes/THEME/layouts/taxonomy/SINGULAR.html  
/themes/THEME/layouts/\_default/taxonomy.html  
/themes/THEME/layouts/\_default/list.html

so I would guess:

**/layouts/taxonomy/author.html**

is the correct place.

On this template, you can add params in the usual way. ie.:

`{{ .Params.bio }}`

---

<div class="post-metadata">

**Author:** ![Alan\_Roy](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@Alan\_Roy](https://discourse.gohugo.io/u/Alan_Roy)\
**Post date:** [June 29, 2017, 9:35pm UTC](https://discourse.gohugo.io/t/help-with-author-pages/7255/20 "2017-06-29T21:35:23Z")

</div>

Okay! I got the \_index.md to render for the individual page, and defined the taxonomy template inside /taxonomy/, so everything is so far working. I actually had it right for a while but needed to restart Hugo for some reason. Now I have to dig deeper to figure out how to map a single frontmatter author to its relevant bios, photo url, etc.

Thank you! I may ask more questions as I keep going, but super appreciate it!

[Next page](https://discourse.gohugo.io/t/help-with-author-pages/7255.md?page=2)
