added proper output directory structure
This commit is contained in:
parent
fdb8753538
commit
988d4ba42e
3 changed files with 52 additions and 1 deletions
|
@ -57,15 +57,17 @@ func processFile(inPath string, entry fs.DirEntry, err error, outRoot string, se
|
|||
return nil
|
||||
} else {
|
||||
ext = filepath.Ext(inPath)
|
||||
outPath = util.ReplaceRoot(inPath, outRoot)
|
||||
// NOTE: This could be an if statement, but keeping
|
||||
// the switch makes it easy to extend the logic here later
|
||||
switch ext {
|
||||
case ".md":
|
||||
toProcess = true
|
||||
outPath = util.ReplaceRoot(inPath, outRoot)
|
||||
outPath = util.ChangeExtension(outPath, ".html")
|
||||
outPath = util.Indexify(outPath)
|
||||
default:
|
||||
toProcess = false
|
||||
outPath = util.ReplaceRoot(inPath, outRoot)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue