mirror of
				https://github.com/gohugoio/hugo.git
				synced 2024-05-11 05:54:58 +00:00 
			
		
		
		
	hugolib, target: Rework/move the target package
This relates to #3123. The interfaces and types in `target` made sense at some point, but now this package is too restricted to a hardcoded set of media types. The overall current logic: * Create a file path based on some `Translator` with some hardcoded logic handling uglyURLs, hardcoded html suffix etc. * In in some cases (alias), a template is applied to create the alias file. * Then the content is written to destination. One could argue that it is the last bullet that is the actual core responsibility. This commit fixes that by moving the `hugolib`-related logic where it belong, and simplify the code, i.e. remove the abstractions. This code will most certainly evolve once we start on #3123, but now it is at least possible to understand where to start. Fixes #3123
This commit is contained in:
		@@ -194,6 +194,8 @@ func (h *HugoSites) assemble(config *BuildCfg) error {
 | 
			
		||||
func (h *HugoSites) render(config *BuildCfg) error {
 | 
			
		||||
	if !config.SkipRender {
 | 
			
		||||
		for _, s := range h.Sites {
 | 
			
		||||
			s.initSiteWriter()
 | 
			
		||||
 | 
			
		||||
			if err := s.render(); err != nil {
 | 
			
		||||
				return err
 | 
			
		||||
			}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user