Generating YouTube Descriptions using Hugo

As far as I could see, there is no way (currently) in hugo to specify a default output type for a type (i.e. youtube) of content, only a kind (e.g. page) of content.

See https://gohugo.io/configuration/cascade, e.g.:

[[cascade]]
outputs = ['html','plain']
[cascade.target]
kind = 'page'
path = '/youtube/**'

You could also cascade the sitemap and build (you can remove the underscore) parameters. You can cascade from the site config or from content/youtube/_index.md.

I would also base your link render hook on the embedded hook:
https://gohugo.io/render-hooks/links/#default

The logic in that embedded hook is required for multilingual single-host sites and to properly resolve the destination under a number of other conditions.

1 Like