static/frontend: remove search pages from search indexes

The search page is disallowed in robots.txt but this
does not prevent it from entering into search indexes.
To fix the warning from the Google Search Console, we
must also add the noindex meta tag to these pages.

Change-Id: I4f19c330aa09a5f1c0cd83ac4aa70091ed705108
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/430282
Run-TryBot: Jamal Carvalho <jamal@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
diff --git a/static/frontend/search/search.tmpl b/static/frontend/search/search.tmpl
index 2e41424..a7ed84c 100644
--- a/static/frontend/search/search.tmpl
+++ b/static/frontend/search/search.tmpl
@@ -8,6 +8,10 @@
   <title>{{.Query}} - Search Results - Go Packages</title>
 {{end}}
 
+{{define "robots"}}
+  <meta name="robots" content="noindex">
+{{end}}
+
 {{define "pre-content"}}
   <link href="/static/frontend/search/search.min.css?version={{.AppVersionLabel}}" rel="stylesheet">
 {{end}}