File tree 2 files changed +3
-0
lines changed
2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ package controller
22
22
import (
23
23
"encoding/json"
24
24
"fmt"
25
+ "github.com/apache/incubator-answer/internal/entity"
25
26
"html/template"
26
27
"net/http"
27
28
"regexp"
@@ -376,6 +377,7 @@ func (tc *TemplateController) QuestionInfo(ctx *gin.Context) {
376
377
"detail" : detail ,
377
378
"answers" : answers ,
378
379
"comments" : comments ,
380
+ "noindex" : detail .Show == entity .QuestionHide ,
379
381
})
380
382
}
381
383
Original file line number Diff line number Diff line change 29
29
< meta name ="description " content ="{{.description}} " data-rh ="true " />
30
30
< meta name ="generator " content ="Answer {{.Version}} - https://github.com/apache/incubator-answer version {{.Revision}} ">
31
31
{{if .keywords }}< meta name ="keywords " content ="{{.keywords}} " data-rh ="true " /> {{end}}
32
+ {{if .noindex }}< meta name ="robots " content ="noindex "> {{end}}
32
33
33
34
< link rel ="canonical " href ="{{.siteinfo.Canonical}} " />
34
35
< link rel ="manifest " href ="/manifest.json " />
You can’t perform that action at this time.
0 commit comments