From 4cad074b44263f400c64eea810278c83473ad06f Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Wed, 10 Apr 2019 15:27:31 -0400 Subject: [PATCH] Link to version-specific writer's guide --- page/page.go | 5 +++++ templates/include/footer.tmpl | 4 ++-- templates/user/include/footer.tmpl | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/page/page.go b/page/page.go index 08e29d4..4560382 100644 --- a/page/page.go +++ b/page/page.go @@ -37,3 +37,8 @@ func (sp *StaticPage) SanitizeHost(cfg *config.Config) { sp.Host = cfg.Server.HiddenHost } } + +func (sp StaticPage) OfficialVersion() string { + p := strings.Split(sp.Version, "-") + return p[0] +} diff --git a/templates/include/footer.tmpl b/templates/include/footer.tmpl index b7291bf..e92878a 100644 --- a/templates/include/footer.tmpl +++ b/templates/include/footer.tmpl @@ -4,7 +4,7 @@ {{if .SingleUser}}