aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--nav.go6
-rw-r--r--page.go4
2 files changed, 8 insertions, 2 deletions
diff --git a/nav.go b/nav.go
index 153a493..c03c90a 100644
--- a/nav.go
+++ b/nav.go
@@ -12,8 +12,10 @@ type navItem struct {
func createNavSlice(site *siteData, cfg config) {
for k, v := range site.pages {
- newNavItem := navItem{AbsoluteUrl: site.baseUrl + "/" + k, Text: v.pageName}
- site.nav = append(site.nav, newNavItem)
+ if k != "" {
+ newNavItem := navItem{AbsoluteUrl: site.baseUrl + "/" + k, Text: v.pageName}
+ site.nav = append(site.nav, newNavItem)
+ }
}
sort.Slice(site.nav, func(i, j int) bool {
diff --git a/page.go b/page.go
index 8bf656a..a88f437 100644
--- a/page.go
+++ b/page.go
@@ -57,5 +57,9 @@ func createPageMap(site *siteData, entries []Renderer) {
}
}
+
+ // create landing page
+ pages[""] = page{pageName: "Home"}
+
site.pages = pages
}