mirror of
				https://github.com/gohugoio/hugo.git
				synced 2024-05-11 05:54:58 +00:00 
			
		
		
		
	Add support for minification of final output
Hugo Pipes added minification support for resources fetched via ´resources.Get` and similar. This also adds support for minification of the final output for supported output formats: HTML, XML, SVG, CSS, JavaScript, JSON. To enable, run Hugo with the `--minify` flag: ```bash hugo --minify ``` This commit is also a major spring cleaning of the `transform` package to allow the new minification step fit into that processing chain. Fixes #1251
This commit is contained in:
		@@ -267,7 +267,7 @@ func (r *transformedResource) initContent() error {
 | 
			
		||||
func (r *transformedResource) transform(setContent bool) (err error) {
 | 
			
		||||
 | 
			
		||||
	openPublishFileForWriting := func(relTargetPath string) (io.WriteCloser, error) {
 | 
			
		||||
		return openFileForWriting(r.cache.rs.PublishFs, r.linker.relTargetPathFor(relTargetPath))
 | 
			
		||||
		return helpers.OpenFileForWriting(r.cache.rs.PublishFs, r.linker.relTargetPathFor(relTargetPath))
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// This can be the last resource in a chain.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user