Merge branch 'feat/1.2.5/noindex' into test
This commit is contained in:
@@ -22,6 +22,7 @@ package controller
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/apache/incubator-answer/internal/entity"
|
||||
"html/template"
|
||||
"net/http"
|
||||
"regexp"
|
||||
@@ -376,6 +377,7 @@ func (tc *TemplateController) QuestionInfo(ctx *gin.Context) {
|
||||
"detail": detail,
|
||||
"answers": answers,
|
||||
"comments": comments,
|
||||
"noindex": detail.Show == entity.QuestionHide,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
<meta name="description" content="{{.description}}" data-rh="true" />
|
||||
<meta name="generator" content="Answer {{.Version}} - https://github.com/apache/incubator-answer version {{.Revision}}">
|
||||
{{if .keywords }}<meta name="keywords" content="{{.keywords}}" data-rh="true" />{{end}}
|
||||
{{if .noindex }}<meta name="robots" content="noindex">{{end}}
|
||||
|
||||
<link rel="canonical" href="{{.siteinfo.Canonical}}" />
|
||||
<link rel="manifest" href="/manifest.json" />
|
||||
|
||||
Reference in New Issue
Block a user