diff --git a/config.go b/config.go
index 2518c0c..e26a8e1 100644
--- a/config.go
+++ b/config.go
@@ -23,6 +23,7 @@ type config struct {
Webmention *configWebmention `mapstructure:"webmention"`
Notifications *configNotifications `mapstructure:"notifications"`
PrivateMode *configPrivateMode `mapstructure:"privateMode"`
+ EasterEgg *configEasterEgg `mapstructure:"easterEgg"`
}
type configServer struct {
@@ -250,6 +251,10 @@ type configPrivateMode struct {
Enabled bool `mapstructure:"enabled"`
}
+type configEasterEgg struct {
+ Enabled bool `mapstructure:"enabled"`
+}
+
type configWebmention struct {
DisableSending bool `mapstructure:"disableSending"`
DisableReceiving bool `mapstructure:"disableReceiving"`
diff --git a/render.go b/render.go
index 5b90096..8d3e5fd 100644
--- a/render.go
+++ b/render.go
@@ -107,6 +107,7 @@ type renderData struct {
CommentsEnabled bool
WebmentionReceivingEnabled bool
TorUsed bool
+ EasterEgg bool
}
func (a *goBlog) render(w http.ResponseWriter, r *http.Request, template string, data *renderData) {
@@ -171,6 +172,10 @@ func (a *goBlog) checkRenderData(r *http.Request, data *renderData) {
data.CommentsEnabled = data.Blog.Comments != nil && data.Blog.Comments.Enabled
// Check if able to receive webmentions
data.WebmentionReceivingEnabled = a.cfg.Webmention == nil || !a.cfg.Webmention.DisableReceiving
+ // Easter egg
+ if ee := a.cfg.EasterEgg; ee != nil && ee.Enabled {
+ data.EasterEgg = true
+ }
// Data
if data.Data == nil {
data.Data = map[string]interface{}{}
diff --git a/templates/base.gohtml b/templates/base.gohtml
index ec74f38..06b347f 100644
--- a/templates/base.gohtml
+++ b/templates/base.gohtml
@@ -23,6 +23,8 @@
{{ include "header" . }}
{{ block "main" . }}{{ end }}
{{ include "footer" . }}
-
+ {{ if .EasterEgg }}
+
+ {{ end }}