mirror of
				https://github.com/gohugoio/hugo.git
				synced 2024-05-11 05:54:58 +00:00 
			
		
		
		
	Externalize the writing of content to a target
Introducing the target module in hugo. This provides the simple interface for writing content given a label (filename) and a io.Reader containing the content to be written. If site.Target is not set, it defaults back to the original behavior of writing to file system. In hugolib/site_url_test.go I have an InMemoryTarget for testing purposes and use it to see if the final output of a render matches.
This commit is contained in:
		
							
								
								
									
										9
									
								
								target/file.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								target/file.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
			
		||||
package target
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"io"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type Publisher interface {
 | 
			
		||||
	Publish(string, io.Reader) error
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user