diff --git a/internal/web/gist.go b/internal/web/gist.go index c108dcc..e3e1d67 100644 --- a/internal/web/gist.go +++ b/internal/web/gist.go @@ -80,6 +80,10 @@ func gistInit(next echo.HandlerFunc) echo.HandlerFunc { setData(ctx, "hasLiked", hasLiked) } + if gist.Private { + setData(ctx, "NoIndex", true) + } + return next(ctx) } } diff --git a/templates/base/base_header.html b/templates/base/base_header.html index 582136e..415a0c3 100644 --- a/templates/base/base_header.html +++ b/templates/base/base_header.html @@ -3,6 +3,10 @@
+ {{ if .NoIndex }} + + {{ end }} +