-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
33 lines (27 loc) · 853 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package main
import (
"os"
"github.com/s12chung/photoswipestory/go/content"
"github.com/s12chung/gostatic/go/app"
"github.com/s12chung/gostatic/go/cli"
)
func main() {
log := app.DefaultLog()
settings := app.DefaultSettings()
contentSettings := content.DefaultSettings()
settings.Content = contentSettings
app.SettingsFromFile("./settings.json", settings, log)
if contentSettings.Demo {
contentSettings.Heading = "My Homes."
contentSettings.Html.WebsiteTitle = "My Homes"
contentSettings.Markdown.MarkdownsPath = "content/demo"
contentSettings.ContentPath = "content/demo"
contentSettings.Swiper.ImagePath = "content/demo/swiper"
}
theContent := content.NewContent(settings.GeneratedPath, contentSettings, log)
err := cli.RunDefault(app.NewApp(theContent, settings, log))
if err != nil {
log.Fatal(err)
os.Exit(1)
}
}