diff options
author | Eddy Pedroni <eddy@0xf7.com> | 2020-02-03 23:28:11 +0100 |
---|---|---|
committer | Eddy Pedroni <eddy@0xf7.com> | 2020-02-03 23:28:11 +0100 |
commit | 49c7201fa68be19b824265615364337a181b1fd7 (patch) | |
tree | 86c9797c7b9052bea5eaaa98059b7783a1590dff | |
parent | e2163d9815c8043d414bfa393f8e83d34fb70a46 (diff) |
Fixed first bug
-rwxr-xr-x | godocs | bin | 4401583 -> 4401583 bytes | |||
-rw-r--r-- | nav.go | 3 | ||||
-rw-r--r-- | site.go | 4 |
3 files changed, 4 insertions, 3 deletions
Binary files differ @@ -1,6 +1,7 @@ package main import ( + "fmt" "sort" "strings" ) @@ -14,6 +15,8 @@ func createNavSlice(site *siteData, cfg config) { for k, v := range site.pages { if k != "" { newNavItem := navItem{AbsoluteUrl: site.baseUrl + "/" + k, Text: v.pageName} + fmt.Println(k) + fmt.Println(newNavItem.AbsoluteUrl) site.nav = append(site.nav, newNavItem) } } @@ -10,7 +10,6 @@ type siteData struct { name string rawName string baseUrl string - outputPath string sourcePath string pages map[string]page nav []navItem @@ -27,8 +26,7 @@ func getSites(cfg config) (sites []siteData) { newSite := siteData{ name: nameify(f.Name()), rawName: f.Name(), - baseUrl: filepath.Join(cfg.BaseUrl, f.Name()), - outputPath: filepath.Join(cfg.TargetDir, f.Name()), + baseUrl: cfg.BaseUrl + "/" + f.Name(), sourcePath: filepath.Join(cfg.DocsRoot, f.Name())} sites = append(sites, newSite) } |