From ca33a035c779ae14fb6330c8801c75f49dd1bb79 Mon Sep 17 00:00:00 2001 From: Mitchell Riedstra Date: Sat, 7 Jan 2023 13:31:23 -0500 Subject: Add an internal caching option. It performs quite well. Also refactor and clean up most linter warnings. --- example-site/index.md | 7 +++++-- example-site/reIndex.md | 2 +- example-site/tpl/dashboard.md | 9 +++++++++ 3 files changed, 15 insertions(+), 3 deletions(-) (limited to 'example-site') diff --git a/example-site/index.md b/example-site/index.md index f9f8fa8..7d51067 100644 --- a/example-site/index.md +++ b/example-site/index.md @@ -19,7 +19,7 @@ it. ## Recent Blog Entries: -[Atom Feed](/{{.Global.App.FeedPrefix}}/Blog?limit=5&content) +[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}} @@ -27,7 +27,7 @@ it. ## Published Blog Entries: {{range $val := .Index.Blog.SortDate}}{{if $val.Published}} - * [{{$val.Date.Time.Format "2006-01-02"}} * {{$val.Title}}]({{$val.Path}}){{end}}{{end}} + * [{{$val.Date.Time.Format "2006-01-02"}} {{$val.Title}}]({{$val.Path}}){{end}}{{end}} ## Some internals @@ -44,3 +44,6 @@ it. {{.EncodeYaml .Index}} ``` + + + diff --git a/example-site/reIndex.md b/example-site/reIndex.md index 88cb278..d1938eb 100644 --- a/example-site/reIndex.md +++ b/example-site/reIndex.md @@ -6,7 +6,7 @@ description: > # {{.Title}} -{{.Global.App.ClearRedis}} +{{.Global.App.ClearCache}} this is the reindex page diff --git a/example-site/tpl/dashboard.md b/example-site/tpl/dashboard.md index 9b90445..4b18b98 100644 --- a/example-site/tpl/dashboard.md +++ b/example-site/tpl/dashboard.md @@ -44,6 +44,14 @@ Pages by tags: {{end}} +It can also be a good idea to clear the cache on the dashboard page: + +``` +{{.Global.App.ClearCache}} +``` + +The element can be hidden, if you'd like. + + -- cgit v1.2.3