Skip to content

Allow mixed text/html templates #3273

@bep

Description

@bep

I lifted this question before, without too much response.

I was reminded by this discussion

https://discuss.gohugo.io/t/hugo-inline-css-optimization-for-google-pagespeed/6032

That the current implementation for custom output types is maybe overly restrictive without any real point.

Right now it is not possible for a HTML template to include a partial that is plain text (defined to be parsed with text/template, i.e. /layouts/index.html => /layouts/partials/mycss.css will not work. Note that /layouts/index.html => /layouts/partials/mycss.html is perfectly fine.

I assume that just allowing the above would be useful, and probably work just fine ... Not sure.

Would love to get feedback (any gotchas? security?) before I spend the work on changing this.

/cc @digitalcraftsman @moorereason

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions