aboutsummaryrefslogtreecommitdiff
path: root/page/page.go
diff options
context:
space:
mode:
Diffstat (limited to 'page/page.go')
-rw-r--r--page/page.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/page/page.go b/page/page.go
index 82f46f2..ecd2268 100644
--- a/page/page.go
+++ b/page/page.go
@@ -25,6 +25,7 @@ package page
import (
"bufio"
"bytes"
+ "encoding/json"
"fmt"
"io"
"log"
@@ -45,6 +46,8 @@ type Page struct {
Title string
Head string
Description string
+ AuthorName string
+ AuthorEmail string
// Tags to apply to the page in question. Useful for Index()
Tags map[string]interface{}
Date *PageTime
@@ -209,3 +212,9 @@ func (p *Page) RenderBody() (string, error) {
func (p Page) String() string {
return fmt.Sprintf("Page: %s", p.path)
}
+
+// StringDetail prints a detailed string of the page
+func (p Page) StringDetail() string {
+ b, _ := json.MarshalIndent(p, "", " ")
+ return fmt.Sprintf("Page: %s\n%s\n", p.path, b)
+}