From 46c6d75da4768c81258d05a4965f99c0db0b3bb4 Mon Sep 17 00:00:00 2001 From: Mitchell Riedstra Date: Sun, 18 Jul 2021 16:07:09 -0400 Subject: Patch it up more --- example-site/checkup.md | 9 --------- example-site/index.md | 8 ++------ page/page.go | 6 ------ 3 files changed, 2 insertions(+), 21 deletions(-) diff --git a/example-site/checkup.md b/example-site/checkup.md index f7d7a88..c8556fa 100644 --- a/example-site/checkup.md +++ b/example-site/checkup.md @@ -47,15 +47,6 @@ description: Showing the output of one of the internal checkup mechanisms {{.Global.App}} ``` -#### Page Index - -{{range $key, $val := .Index}} -``` -### {{$key}}: - -{{range $v2 := $val}} -{{$v2.StringDetail}}{{end}} -``` {{end}} diff --git a/example-site/index.md b/example-site/index.md index 42b0181..2280662 100644 --- a/example-site/index.md +++ b/example-site/index.md @@ -38,14 +38,10 @@ it. {{.Global.App}} ``` -#### Page Index +#### Page Index ( details ) -{{range $key, $val := .Index}} ``` -### {{$key}}: - -{{range $v2 := $val}} -{{$v2.StringDetail}}{{end}} +{{.EncodeYaml .Index}} ``` diff --git a/page/page.go b/page/page.go index 5604f1c..52a441c 100644 --- a/page/page.go +++ b/page/page.go @@ -177,9 +177,3 @@ 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) -} -- cgit v1.2.3