I am making a theme for my site. I discovered that I cannot define taxonomies in a theme configuration file. Instead I have to define them in the site configuration file. But that severely limits the portability of my theme. Is there a way to associate taxonomies with a theme instead of a site?
For example, I have defined the series
taxonomy for posts. That is, multiple posts can belong to a series of articles which are linked to the post. I also have a post
archetype in my theme which defines the series
parameter for the theme to use. So when a user imports the theme and types hugo new post/example.md
, the resulting file will have series = []
in the front matter. However filling that parameter won’t work unless the user explicitly edits their site config file by adding
[taxonomies]
series = "series""
Is there a way to make the taxonomy available to the site just by importing the theme?