diff options
author | Eddy Pedroni <eddy@0xf7.com> | 2020-02-01 11:06:24 +0100 |
---|---|---|
committer | Eddy Pedroni <eddy@0xf7.com> | 2020-02-01 11:08:12 +0100 |
commit | 4bedcc88d171a0886a114c604a79155d088bdbeb (patch) | |
tree | 1d6b24ebd61e55371dbc8a1e0f862eae0efc3099 /main.go | |
parent | 5ec92205b871ede6ae4b8afc755efb7d06d1ffd9 (diff) |
Fixed URL generation, added nav list generation, added page generation
stub
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 24 |
1 files changed, 10 insertions, 14 deletions
@@ -5,11 +5,6 @@ import ( "os" ) -type templateData struct { - SiteTitle string - Pages map[string]page - Index int -} func main() { // show usage if config file is missing @@ -31,14 +26,15 @@ func main() { } // render all entries - var pages = make(map[string]page) - for _, e := range entries { - fmt.Println("Processing page") - e.render(pages) - fmt.Println(pages) - fmt.Println("**************") - - } - fmt.Println("----------------------------------------------------------------------------------------------") + pages := createPageMap(entries) + fmt.Println("Pages:") fmt.Println(pages) + + // create navigation item slice + navItems := createNavSlice(pages, cfg) + fmt.Println("Navigation:") + fmt.Println(navItems) + + generatePages(pages, navItems, cfg) + } |