My code repository is in https://github.com/shankar/monolog.
I created custom taxonomy author = "authors"
and the taxonomy page does not work with layout/authors/taxonomy.html
nor the taxonomy term page work with layout/authors/term.html
but both work with list.html
or authors.html
. I want taxonomy page to list all the authors and the taxonomy term page to provide information about the author but unfortunately both only recognise the same template. Please help
You need to define the taxonomies in the project config file, not the theme config file. As a best practice, don’t add anything to the theme’s config file.
Also, don’t add layouts to the theme. Add them to the layouts directory in the root of your project. Otherwise you may lose your customizations when you update the theme.
Wow thanks. It works perfectly now . You are a life saver. I have been bagging my head against the wall for 2 days with documentation for this.
Can you please elaborate on your second point please . I am unable to understand.
Actually i am trying to create a theme for hugo here and the author taxonomy is an integral part of the theme. It is incomplete . That is why i add the taxonomy template to the theme. It is not supposed to be a customization. Am i doing it wrong ? Please guide me . This is my first try to create a theme. I intend to publish the theme
I have another question . I wanted the taxonomy “authors” to be a part of the theme. That is why i added it to the theme config file which turned out to be a mistake. How should i do this without adding the taxonomy in the theme config file. Should i add the instructions in the README.md
file and hope it is used ?
Yes. See the documentation to understand which keys in the theme/module configuration are merged into the project configuration.
Disregard. I didn’t realize you were developing a theme.
thank you for your guidance
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.