restore previous functionality with new processing system
This commit is contained in:
parent
65b62ef9a6
commit
116fb6a883
3 changed files with 14 additions and 2 deletions
4
TODO.md
4
TODO.md
|
@ -1,6 +1,8 @@
|
||||||
# TODO
|
# TODO
|
||||||
|
|
||||||
**Last working on:** I fixed the frontmatter processing; now I should verify that the entire directory is being processed okay.
|
- Fix the relative URL situation in the headers
|
||||||
|
- The link that's defined in header file should be relative to root, not the page being processed.
|
||||||
|
- How to handle this?
|
||||||
|
|
||||||
## Thoroughly test directory processing
|
## Thoroughly test directory processing
|
||||||
|
|
||||||
|
|
|
@ -43,9 +43,17 @@ func main() {
|
||||||
}
|
}
|
||||||
settings := builder.GetSettings(*rootPath, "foobar")
|
settings := builder.GetSettings(*rootPath, "foobar")
|
||||||
// err := builder.Traverse(*rootPath, "foobar", settings)
|
// err := builder.Traverse(*rootPath, "foobar", settings)
|
||||||
|
// traverse the source and process file metadata
|
||||||
pm, err := builder.ProcessTraverse(*rootPath, "foobar", settings)
|
pm, err := builder.ProcessTraverse(*rootPath, "foobar", settings)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf("Error: %s\n", err.Error())
|
fmt.Printf("Error: %s\n", err.Error())
|
||||||
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
err = builder.BuildProcessedFiles(pm, settings)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Printf("Error: %s\n", err.Error())
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
|
||||||
fmt.Printf("%#v", pm)
|
fmt.Printf("%#v", pm)
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,9 @@ func processFile(inPath string, entry fs.DirEntry, err error, outRoot string, se
|
||||||
var toProcess bool
|
var toProcess bool
|
||||||
var outPath string
|
var outPath string
|
||||||
var ext string
|
var ext string
|
||||||
if !entry.IsDir() {
|
if entry.IsDir() {
|
||||||
|
return nil
|
||||||
|
} else {
|
||||||
ext = filepath.Ext(inPath)
|
ext = filepath.Ext(inPath)
|
||||||
outPath = util.ReplaceRoot(inPath, outRoot)
|
outPath = util.ReplaceRoot(inPath, outRoot)
|
||||||
// NOTE: This could be an if statement, but keeping
|
// NOTE: This could be an if statement, but keeping
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue