mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-14 20:33:59 +02:00
Support non-md files as archetype files
It now properly uses the extension of the target file to determine archetype file. Fixes #3597 Fixes #3618
This commit is contained in:
@@ -287,6 +287,12 @@ func GetDottedRelativePath(inPath string) string {
|
||||
return dottedPath
|
||||
}
|
||||
|
||||
// Ext takes a path and returns the extension, including the delmiter, i.e. ".md".
|
||||
func Ext(in string) string {
|
||||
_, ext := fileAndExt(in, fpb)
|
||||
return ext
|
||||
}
|
||||
|
||||
// Filename takes a path, strips out the extension,
|
||||
// and returns the name of the file.
|
||||
func Filename(in string) (name string) {
|
||||
|
Reference in New Issue
Block a user