From 63975c2019d9a943be9f6d6f122239749b0e75f4 Mon Sep 17 00:00:00 2001 From: ZizzyDizzyMC Date: Tue, 9 Feb 2021 20:00:20 -0500 Subject: [PATCH] Extra footer text block test. --- server.go | 2 ++ templates.go | 1 + templates/base.html | 4 +++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/server.go b/server.go index 4d06db9..903288f 100644 --- a/server.go +++ b/server.go @@ -304,6 +304,8 @@ func main() { "path to directory containing .md files to render as custom pages") flag.Uint64Var(&Config.cleanupEveryMinutes, "cleanup-every-minutes", 0, "How often to clean up expired files in minutes (default is 0, which means files will be cleaned up as they are accessed)") + flag.StringVar(&Config.extraFooterText, "extrafootertext", "", + "Extra text above the footer for notices.") iniflags.Parse() diff --git a/templates.go b/templates.go index 7d38b51..6dcf852 100644 --- a/templates.go +++ b/templates.go @@ -87,6 +87,7 @@ func renderTemplate(tpl *pongo2.Template, context pongo2.Context, r *http.Reques context["sitepath"] = Config.sitePath context["selifpath"] = Config.selifPath context["custom_pages_names"] = customPagesNames + context["extra_footer_text"] = Config.extraFooterText var a string if Config.authFile == "" { diff --git a/templates/base.html b/templates/base.html index 7e4f82d..847a995 100644 --- a/templates/base.html +++ b/templates/base.html @@ -29,7 +29,9 @@ {% block content %}{% endblock %} - +