mirror of
				https://github.com/gohugoio/hugo.git
				synced 2024-05-11 05:54:58 +00:00 
			
		
		
		
	Split out the puthe path/filepath functions into common/paths
So they can be used from the config package without cyclic troubles. Updates #8654
This commit is contained in:
		@@ -20,6 +20,8 @@ import (
 | 
			
		||||
	"strings"
 | 
			
		||||
	"time"
 | 
			
		||||
 | 
			
		||||
	"github.com/gohugoio/hugo/common/paths"
 | 
			
		||||
 | 
			
		||||
	"github.com/pkg/errors"
 | 
			
		||||
 | 
			
		||||
	"github.com/gohugoio/hugo/helpers"
 | 
			
		||||
@@ -129,7 +131,7 @@ func executeArcheTypeAsTemplate(s *hugolib.Site, name, kind, targetPath, archety
 | 
			
		||||
 | 
			
		||||
	// Reuse the Hugo template setup to get the template funcs properly set up.
 | 
			
		||||
	templateHandler := s.Deps.Tmpl().(tpl.TemplateManager)
 | 
			
		||||
	templateName := helpers.Filename(archetypeFilename)
 | 
			
		||||
	templateName := paths.Filename(archetypeFilename)
 | 
			
		||||
	if err := templateHandler.AddTemplate("_text/"+templateName, string(archetypeTemplate)); err != nil {
 | 
			
		||||
		return nil, errors.Wrapf(err, "Failed to parse archetype file %q:", archetypeFilename)
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user