Skip to content

Commit

Permalink
more renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
facundoolano committed Feb 19, 2024
1 parent 909b804 commit 5b844ac
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions commands/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ import (
"github.com/fsnotify/fsnotify"
)

// Generate and serve the site, rebuilding when the source files change.
// Generate and serve the site, rebuilding when the source files change
// and triggering a page refresh on clients browsing it.
func Serve(rootDir string) error {
config, err := config.LoadDev(rootDir)
if err != nil {
return err
}

if err := buildSite(config); err != nil {
if err := rebuildSite(config); err != nil {
return err
}

Expand Down Expand Up @@ -102,7 +103,7 @@ func setupWatcher(config *config.Config) (*fsnotify.Watcher, *EventBroker, error
continue
}

if err := buildSite(config); err != nil {
if err := rebuildSite(config); err != nil {
fmt.Println("build error:", err)
continue
}
Expand Down Expand Up @@ -140,7 +141,7 @@ func addAll(watcher *fsnotify.Watcher, config *config.Config) error {
return err
}

func buildSite(config *config.Config) error {
func rebuildSite(config *config.Config) error {
site, err := site.Load(*config)
if err != nil {
return err
Expand Down

0 comments on commit 5b844ac

Please sign in to comment.