A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.
update ask question
aichy126864c0440172a
diff --git a/configs/path_ignore.yaml b/configs/path_ignore.yamlindex ad1c0ad8..4ecb1237 100644--- a/configs/path_ignore.yaml+++ b/configs/path_ignore.yaml@@ -9,3 +9,5 @@ users:- account-activation- confirm-new-email- account-suspended+questions:+ - askdiff --git a/internal/controller/template_controller.go b/internal/controller/template_controller.goindex e5267971..34665a3a 100644--- a/internal/controller/template_controller.go+++ b/internal/controller/template_controller.go@@ -192,6 +192,18 @@ func (tc *TemplateController) QuestionInfo(ctx *gin.Context) {title := ctx.Param("title")answerid := ctx.Param("answerid")+ if id == "ask" {+ file, err := ui.Build.ReadFile("build/index.html")+ if err != nil {+ log.Error(err)+ tc.Page404(ctx)+ return+ }+ ctx.Header("content-type", "text/html;charset=utf-8")+ ctx.String(http.StatusOK, string(file))+ return+ }+correctTitle := falsedetail, err := tc.templateRenderController.QuestionDetail(ctx, id)diff --git a/ui/template/header.html b/ui/template/header.htmlindex 4740d2eb..92c1ce5f 100644--- a/ui/template/header.html+++ b/ui/template/header.html@@ -6,15 +6,15 @@<meta charset="utf-8" /><meta name="viewport" content="width=device-width,initial-scale=1" /><title>{{.title}}</title>- <meta name="description" content="{{.description}}" />- {{if .keywords }}<meta name="keywords" content="{{.keywords}}" />{{end}}+ <meta name="description" content="{{.description}}" data-rh="true"/>+ {{if .keywords }}<meta name="keywords" content="{{.keywords}}" data-rh="true"/>{{end}}<link rel="canonical" href="{{.siteinfo.Canonical}}" /><link rel="manifest" href="/manifest.json"/><link href="{{.cssPath}}" rel="stylesheet" /><link href="/custom.css" rel="stylesheet"><link rel="icon" type="image/png" href="{{if $.siteinfo.Branding.Favicon }}{{$.siteinfo.Branding.Favicon}}{{else}}/favicon.ico{{end}}" data-rh="true"><link rel="icon" type="image/png" sizes="192x192" href="{{.siteinfo.Branding.SquareIcon}}" data-rh="true">- <link rel="apple-touch-icon" type="image/png" href={{.siteinfo.Branding.SquareIcon}} />+ <link rel="apple-touch-icon" type="image/png" href="{{.siteinfo.Branding.SquareIcon}}" data-rh="true"/><script defer="defer" src="{{.scriptPath}}"></script>{{if $.siteinfo.JsonLD }}{{ .siteinfo.JsonLD | templateHTML}}{{end}}</head>