mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-26 05:30:54 +03:00
Nitro timer is encapsulated.
Remove the need for NewSite by relying on appropriate defaults. Renamed site.c to site.Config to allow Sites to be created outside the package.
This commit is contained in:
parent
e26b43f6d9
commit
309db474c7
3 changed files with 64 additions and 45 deletions
4
main.go
4
main.go
|
@ -102,7 +102,7 @@ func main() {
|
|||
}
|
||||
|
||||
if *checkMode {
|
||||
site := hugolib.NewSite(config)
|
||||
site := hugolib.Site{Config: *config}
|
||||
site.Analyze()
|
||||
os.Exit(0)
|
||||
}
|
||||
|
@ -143,7 +143,7 @@ func serve(port string, config *hugolib.Config) {
|
|||
|
||||
func buildSite(config *hugolib.Config) (site *hugolib.Site, err error) {
|
||||
startTime := time.Now()
|
||||
site = hugolib.NewSite(config)
|
||||
site = &hugolib.Site{Config: *config}
|
||||
err = site.Build()
|
||||
if err != nil {
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue