diff --git a/modules/setting/server.go b/modules/setting/server.go index 5cc33f6fc4..f29ba5bf0b 100644 --- a/modules/setting/server.go +++ b/modules/setting/server.go @@ -89,6 +89,7 @@ var ( StaticCacheTime time.Duration EnableGzip bool LandingPageURL LandingPage + LandingPageDetails bool UnixSocketPermission uint32 EnablePprof bool PprofDataPath string @@ -360,9 +361,10 @@ func loadServerFrom(rootCfg ConfigProvider) { LandingPageURL = LandingPageOrganizations case "login": LandingPageURL = LandingPageLogin - case "", "home": + case "", "home", "nodetails": LandingPageURL = LandingPageHome default: LandingPageURL = LandingPage(landingPage) } + LandingPageDetails = (landingPage != "nodetails") } diff --git a/routers/web/home.go b/routers/web/home.go index 4ea961c055..cdc323f742 100644 --- a/routers/web/home.go +++ b/routers/web/home.go @@ -59,6 +59,7 @@ func Home(ctx *context.Context) { return } + ctx.Data["LandingPageDetails"] = setting.LandingPageDetails ctx.Data["PageIsHome"] = true ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled diff --git a/templates/home.tmpl b/templates/home.tmpl index 168bfbefa6..dcae8deb66 100644 --- a/templates/home.tmpl +++ b/templates/home.tmpl @@ -11,6 +11,8 @@ - {{template "home_forgejo" .}} + {{if .LandingPageDetails}} + {{template "home_forgejo" .}} + {{end}} {{template "base/footer" .}}