Not generating content for author taxonomy

I’m trying to generate taxonomy and taxonomy term pages for blog authors. I have this feature working for tags and categories, but when I generate the site, only index.html gets generated in the authors folder.

In config.toml, I have declared my taxonomies:

[taxonomies]
  author   = "authors"
  tag      = "tags"
  category = "categories"

In the front matter, I am declaring the relevant taxonomies:

categories: ['Tutorials', 'Websites']
tags: ['Hugo', 'Codeship', 'DigitalOcean', 'CI-CD']
author: "Ashley Bye"

And I have the following structure in ./content:

tree ./content/
./content/
β”œβ”€β”€ authors
β”‚   └── ashley-bye
β”‚       └── _index.md
β”œβ”€β”€ blog
β”‚   └── 2017
β”‚       β”œβ”€β”€ 10
β”‚       β”‚   └── test-3.md
β”‚       β”œβ”€β”€ 11
β”‚       β”‚   β”œβ”€β”€ test-1.md
β”‚       β”‚   └── test-2.md
β”‚       β”œβ”€β”€ 12
β”‚       β”‚   └── automating-hugo-deployment-to-digitalocean-with-codeship.md
β”‚       β”œβ”€β”€ 6
β”‚       β”‚   └── test-10.md
β”‚       β”œβ”€β”€ 7
β”‚       β”‚   └── test-9.md
β”‚       β”œβ”€β”€ 8
β”‚       β”‚   β”œβ”€β”€ test-7.md
β”‚       β”‚   └── test-8.md
β”‚       └── 9
β”‚           β”œβ”€β”€ test-4.md
β”‚           β”œβ”€β”€ test-5.md
β”‚           └── test-6.md
└── page
    β”œβ”€β”€ about-me.md

Yet, when I run hugo, my public folder does not have any author pages:

tree ./public/ 110ms ξ‚³ Tue  2 Jan 08:03:45 2018
./public/
β”œβ”€β”€ authors
β”‚   β”œβ”€β”€ ashley-bye
β”‚   β”‚   └── index.html
β”‚   └── index.html
β”œβ”€β”€ blog
β”‚   β”œβ”€β”€ 2017
β”‚   β”‚   β”œβ”€β”€ 10
β”‚   β”‚   β”‚   └── test-3
β”‚   β”‚   β”‚       └── index.html
β”‚   β”‚   β”œβ”€β”€ 11
β”‚   β”‚   β”‚   β”œβ”€β”€ test-1
β”‚   β”‚   β”‚   β”‚   └── index.html
β”‚   β”‚   β”‚   └── test-2
β”‚   β”‚   β”‚       └── index.html
β”‚   β”‚   β”œβ”€β”€ 12
β”‚   β”‚   β”‚   └── automating-hugo-deployment-to-digitalocean-with-codeship
β”‚   β”‚   β”‚       └── index.html
β”‚   β”‚   β”œβ”€β”€ 6
β”‚   β”‚   β”‚   └── test-10
β”‚   β”‚   β”‚       └── index.html
β”‚   β”‚   β”œβ”€β”€ 7
β”‚   β”‚   β”‚   └── test-9
β”‚   β”‚   β”‚       └── index.html
β”‚   β”‚   β”œβ”€β”€ 8
β”‚   β”‚   β”‚   β”œβ”€β”€ test-7
β”‚   β”‚   β”‚   β”‚   └── index.html
β”‚   β”‚   β”‚   └── test-8
β”‚   β”‚   β”‚       └── index.html
β”‚   β”‚   └── 9
β”‚   β”‚       β”œβ”€β”€ test-4
β”‚   β”‚       β”‚   └── index.html
β”‚   β”‚       β”œβ”€β”€ test-5
β”‚   β”‚       β”‚   └── index.html
β”‚   β”‚       └── test-6
β”‚   β”‚           └── index.html
β”‚   β”œβ”€β”€ index.html
β”‚   └── page
β”‚       β”œβ”€β”€ 1
β”‚       β”‚   └── index.html
β”‚       └── 2
β”‚           └── index.html
β”œβ”€β”€ categories
β”‚   β”œβ”€β”€ index.html
β”‚   β”œβ”€β”€ tutorials
β”‚   β”‚   └── index.html
β”‚   └── websites
β”‚       └── index.html
β”œβ”€β”€ css
β”‚   β”œβ”€β”€ custom.css
β”œβ”€β”€ favicon-16x16.png
β”œβ”€β”€ favicon-32x32.png
β”œβ”€β”€ images
β”‚   β”œβ”€β”€ 20171228
β”‚   β”‚   β”œβ”€β”€ connect-github.png
β”‚   β”‚   β”œβ”€β”€ delete-test-pipeline.png
β”‚   β”‚   β”œβ”€β”€ master-branch.png
β”‚   β”‚   └── new-project.png
β”‚   └── avatars
β”‚       └── ashley-bye.png
β”œβ”€β”€ index.html
β”œβ”€β”€ index.xml
β”œβ”€β”€ page
β”‚   β”œβ”€β”€ 1
β”‚   β”‚   └── index.html
β”‚   β”œβ”€β”€ 2
β”‚   β”‚   └── index.html
β”‚   β”œβ”€β”€ about-me
β”‚   β”‚   └── index.html
β”‚   β”œβ”€β”€ index.html
β”‚   └── page
β”‚       β”œβ”€β”€ 1
β”‚       β”‚   └── index.html
β”‚       └── 2
β”‚           └── index.html
β”œβ”€β”€ robots.txt
β”œβ”€β”€ sitemap.xml
└── tags
    β”œβ”€β”€ ci-cd
    β”‚   └── index.html
    β”œβ”€β”€ codeship
    β”‚   └── index.html
    β”œβ”€β”€ digitalocean
    β”‚   └── index.html
    β”œβ”€β”€ hugo
    β”‚   └── index.html
    └── index.html

In the tags and categories taxonomy pages, I am using {{ range .Data.Pages }} to iterate through associated posts. However, this again does not produce any content for the author.

My theme layout directory includes a taxonomy folder:

./themes/ashleybyeuk/layouts/taxonomy/
β”œβ”€β”€ author.html
β”œβ”€β”€ author.terms.html
β”œβ”€β”€ category.html
β”œβ”€β”€ category.terms.html
β”œβ”€β”€ tag.html
└── tag.terms.html

What is causing this and how should I fix it?

Have you tried writing in FM like this:

authors: [ "Ashley Bye" ]
1 Like

[https://tr.cloudmagic.com/h/v6/emailtag/tag/2.0/1514884919/2a29456be1e332107395b56c40088fbd/1/1017689f32c7270f487429ee46c7867d/c748fa08a6eefebf220fc24557f85b6b/86907ac9b49ba2e1e73da0d62b422926/newton.gif]

I did try that, but since I only have one author per post it makes sense to use the singular. It also breaks a bunch of partials where I display the author name and would require a range, which again doesn’t seem to make sense and seems quite hacky.

via Newton Mailhttps://cloudmagic.com/k/d/mailapp?ct=pa&cv=9.8.151&pv=8.1.0&source=email_footer_2

I suggest you post to this forum via the browser and not that Newton Mail editor.

As I understand it, the mechanism for generating taxonomy works only with arrays []. You will have to change the code that you wrote for strings.

To access data from an array, you need to use the index function. Just replace {{ .Params.author }} on {{ index .Params.authors 0 }} 0 - first string from array.

Perfect - problem solved, thank you.