Force generation of Taxonomy Page that has no related content


#1

We have implemented a user system using the popular authors taxonomy method, where each user profile lives at author/<name>/_index.md.

We wish to list all users and link to their user profile pages whether or not each user has published content (i.e. whether or not their name appears in the authors field of any content).

The purpose of this is for a people widget where a visitor can view an organisation’s staff and click on each user to see their profile and contact details AND see links to any posts made by that user.

The problem is that Hugo does not generate taxonomy pages when they have no related content.

Any idea if we can force generate all author taxonomy pages whether or not each user has published content? Or any ideas on a better way to implement the user system for our purpose?


#2

my 2 cents …

try to make published content for every author.

author = [ list all authors here ]

Set a param

publish = false

In author category list template => add where to range to drop this page in listings!

{{ range where .Pages "Param.publish" "!=" "false" }}
  {{ .Render "summary" }}
{{ end }}

NOT tested!