This is not a new topic, it’s a reference to the link below. I added here because the link below is getting buried.
I’m sure you guys are busy and I want to thank you for the time and effort you put in to not only building Hugo, but also responding to people’s questions.
Joe Mooring has posted a lot of great tips and tricks, and also answered a few of my questions in the past.
It seems likely you would have specified Create a ‘new’ Topic, because you have a system in place for bumping updated topics.
Just mention if you want me to put this on the original topic page. I will mark this solved and move to the original one.
I’m still looking for ways to reduce taxonomy html output for a specific page type, or taxonomy, while still using the related taxonomy functionality during build time.
Presumably, it’s not that big a deal, in terms of reducing build time, but rendering the tags pages and the <head>
partial in all the pages take by far the most time in the build.
In terms of the adapter, I’m looking to override the terms page, which doesn’t seem possible.
Here is the example for a standard adapter page, skipping the loop and other content:
<!-- tags -->
{{- $tags := slice -}}
{{- $tagTermsSlice := slice -}}
{{- with $entries.tags -}}
{{- range . -}}
{{- $tags = $tags | append ( . | safeURL) -}}
{{- $tagTermsSlice = $tagTermsSlice | append (dict "kind" "term" "path" ( (printf `%s%s` "tags/" . ) | safeURL) "build" (dict "render" "never") ) -}}
{{- end -}}
{{- end -}}
{{/* $dates, $params, $path, etc .... */}}
{{ $page := dict
"dates" $dates
"kind" "page"
"params" $params
"path" $path
"title" $title
}}
{{ $.AddPage $page }}
{{- with $tagTermsSlice -}}
{{- range . -}}
{{- $.AddPage . -}}
{{- end -}}
{{- end -}}
The idea is to override the term page for each tag the content adapter creates by matching the path, adding “kind” “term” and then specifying in the build dictionary to never render.
Possibly if I knew more about what you guys were doing under the hood, I would even bother with that
But I did not see the option to specify taxonomy output rendering restrictions by filtered data, just the all or nothing options:
disableKinds = ['taxonomy', 'term']
[taxonomies]
category = ''
tag = ''
Any hints or feedback?