Move block create before normal page creation
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
5cc4e65638
commit
057b8d2f46
15
file.go
15
file.go
|
@ -228,6 +228,13 @@ func (fp *FilePages) save(msg saveMessage) error {
|
|||
page.Name = strings.Replace(p, " ", "_", -1)
|
||||
page.Title = strings.Replace(p, "_", " ", -1)
|
||||
|
||||
sw.Start("create blocks")
|
||||
err := saveBlocksFromPage(fp.dirname, page)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
}
|
||||
sw.Stop()
|
||||
|
||||
if p[0] != '_' {
|
||||
sw.Start("prepare")
|
||||
|
||||
|
@ -284,13 +291,7 @@ func (fp *FilePages) save(msg saveMessage) error {
|
|||
sw.Stop()
|
||||
}
|
||||
|
||||
sw.Start("create blocks")
|
||||
err := saveBlocksFromPage(fp.dirname, page)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
}
|
||||
sw.Stop()
|
||||
return err
|
||||
return nil
|
||||
}
|
||||
|
||||
func saveWithNewIDs(dirname string, listItems []ListItemV2, pageName string) ([]ListItem, error) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user