diff options
| author | Mitchell Riedstra <mitch@riedstra.dev> | 2021-07-18 16:26:12 -0400 |
|---|---|---|
| committer | Mitchell Riedstra <mitch@riedstra.dev> | 2021-07-18 16:26:12 -0400 |
| commit | f835954270e8a04fd1c03e7cb29d4d69e331731a (patch) | |
| tree | b8eaec45b02d79f8d51d6726ffbbe34ce5de2ed7 | |
| parent | 46c6d75da4768c81258d05a4965f99c0db0b3bb4 (diff) | |
| download | go-website-example.tar.gz go-website-example.tar.xz | |
Further tune the example siteexample
| -rw-r--r-- | example-site/checkup.md | 39 | ||||
| -rw-r--r-- | example-site/index.md | 12 | ||||
| -rw-r--r-- | page/page.go | 1 |
3 files changed, 16 insertions, 36 deletions
diff --git a/example-site/checkup.md b/example-site/checkup.md index c8556fa..622d836 100644 --- a/example-site/checkup.md +++ b/example-site/checkup.md @@ -8,46 +8,29 @@ description: Showing the output of one of the internal checkup mechanisms # Status +Current statuses: +``` +{{range $key, $val := .Checkup}}{{$key}} +{{end}} +``` + {{range $key, $val := .Checkup}} ## {{$key}}: {{range $page := $val}} ``` {{$page}} -{{$page.EncodeYaml nil}} +{{$.EncodeYaml $page}} ``` {{end}} {{end}} -## Raw - -``` -{{.EncodeYaml .Checkup}} -``` - -## Recent Blog Entries: - -[Atom Feed](/{{.Global.App.FeedPrefix}}/Blog?limit=5&content) -{{range $val := .Index.Blog.SortDate}} - * [{{$val.Date.Time.Format "2006-01-02"}} {{$val.Title}}]({{$val.Path}}){{end}} -## Published Blog Entries: +<!-- -{{range $val := .Index.Blog.SortDate}}{{if $val.Published}} - * [{{$val.Date.Time.Format "2006-01-02"}} * {{$val.Title}}]({{$val.Path}}){{end}}{{end}} - -## Some internals - - -#### Global vars: +## Raw ``` -{{.Global}} - -"App" under Global vars: -{{.Global.App}} +{{.EncodeYaml .Checkup}} ``` - - -{{end}} - +--> diff --git a/example-site/index.md b/example-site/index.md index 2280662..f9f8fa8 100644 --- a/example-site/index.md +++ b/example-site/index.md @@ -12,7 +12,10 @@ it. `code style text` -[reIndex page]({{.Global.App.ReIndexPath}}) + * [reIndex page]({{.Global.App.ReIndexPath}}) + * [404 Page](/some/path/that/does/not/exist/at/all) + * [Example checkup page](/checkup) + ## Recent Blog Entries: @@ -32,10 +35,7 @@ it. #### Global vars: ``` -{{.Global}} - -"App" under Global vars: -{{.Global.App}} +{{.EncodeYaml .Global}} ``` #### Page Index ( details ) @@ -44,5 +44,3 @@ it. {{.EncodeYaml .Index}} ``` - -{{end}} diff --git a/page/page.go b/page/page.go index 52a441c..e984383 100644 --- a/page/page.go +++ b/page/page.go @@ -25,7 +25,6 @@ package page import ( "bufio" "bytes" - "encoding/json" "fmt" "io" "log" |
