You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@answer.apache.org by li...@apache.org on 2024/06/14 08:50:56 UTC

(incubator-answer) branch fix/1.3.5/init updated: feat(init): set permalink init config is only question id

This is an automated email from the ASF dual-hosted git repository.

linkinstar pushed a commit to branch fix/1.3.5/init
in repository https://gitbox.apache.org/repos/asf/incubator-answer.git


The following commit(s) were added to refs/heads/fix/1.3.5/init by this push:
     new ac251607 feat(init): set permalink init config is only question id
ac251607 is described below

commit ac25160791b0def306c38cce3c59c296980206f9
Author: LinkinStars <li...@foxmail.com>
AuthorDate: Fri Jun 14 16:50:46 2024 +0800

    feat(init): set permalink init config is only question id
---
 internal/migrations/init.go | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/internal/migrations/init.go b/internal/migrations/init.go
index 55914a04..a56216aa 100644
--- a/internal/migrations/init.go
+++ b/internal/migrations/init.go
@@ -23,6 +23,7 @@ import (
 	"context"
 	"encoding/json"
 	"fmt"
+	"github.com/apache/incubator-answer/internal/base/constant"
 	"time"
 
 	"github.com/apache/incubator-answer/internal/base/data"
@@ -207,7 +208,7 @@ func (m *Mentor) initSiteInfoThemeConfig() {
 
 func (m *Mentor) initSiteInfoSEOConfig() {
 	seoData := map[string]interface{}{
-		"permalink": 1,
+		"permalink": constant.PermalinkQuestionID,
 		"robots":    defaultSEORobotTxt + m.userData.SiteURL + "/sitemap.xml",
 	}
 	seoDataBytes, _ := json.Marshal(seoData)