-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add HTML tidying as an option #7190
Add HTML tidying as an option #7190
Comments
You know you can minify the output? |
Yes. Not really the point though when you're design focused and looking at your DOM output. I know the javascript world has destroyed that but one of the nicest things about hugo is outputting simple, classic static html. Thanks for all the work you do on hugo 🙏🏽 |
You're right, the HTML output from Go templates leave much to be desired ... Note that I think this should be implemented in the same place as we do output minification. |
This is similar to --minify, but has essentially the opposite effect: instead of making the output less readable it makes it *more* readable. This uses github.com/yosssi/gohtml to perform the actual transformation. Fixes gohugoio#7190
This is similar to --minify, but has essentially the opposite effect: instead of making the output less readable it makes it *more* readable. This uses github.com/yosssi/gohtml to perform the actual transformation. Fixes gohugoio#7190
I've written an initial implementation of this: #7825 I'd love some feedback. |
As an inelegant workaround I do something like the following. I like having predictable and clean HTML output for a particular
|
https://gohugo.io/news/0.69.0-relnotes/
Given the hugo templating engine creates whitespace hell in output now that
resources.PostProcess
exists it would be awesome to have a similar hook to tidy the output HTML.Here's a great Go lib that does it perfectly https://github.com/yosssi/gohtml
The text was updated successfully, but these errors were encountered: