shithub: hugo

Download patch

ref: acf9561a312207ec3c64c098d09bb1b039e06548
parent: b336abcf81b2f09edd6d3e30ce49a7258f2f3e74
author: Nate Finch <[email protected]>
date: Sat Sep 6 04:03:03 EDT 2014

fix zero date

--- a/hugolib/page.go
+++ b/hugolib/page.go
@@ -159,7 +159,6 @@
 		Params: make(map[string]interface{})}
 
 	jww.DEBUG.Println("Reading from", page.File.FileName)
-	page.Date, _ = time.Parse("20060102", "20080101")
 	page.guessSection()
 	return &page
 }
--- a/hugolib/site_test.go
+++ b/hugolib/site_test.go
@@ -533,8 +533,8 @@
 	if err != nil {
 		t.Fatalf("Unable to make PageGroup array: %s", err)
 	}
-	if bydate[0].Key != "2008-01" {
-		t.Errorf("PageGroup array in unexpected order. First group key should be '%s', got '%s'", "2008-01", bydate[0].Key)
+	if bydate[0].Key != "0001-01" {
+		t.Errorf("PageGroup array in unexpected order. First group key should be '%s', got '%s'", "0001-01", bydate[0].Key)
 	}
 	if bydate[1].Key != "2012-01" {
 		t.Errorf("PageGroup array in unexpected order. Second group key should be '%s', got '%s'", "2012-01", bydate[1].Key)