File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3737 signature: " 鼠鼠是穿越者..." # 个性签名
3838 about: " 鼠鼠是一个喜欢折腾的程序员..." # 关于我
3939 avatarPath: avatar.jpg # 头像路径
40+ server: https://123c.com # 远程路径,不需要填写端口号
4041 comment_enabled: false # 是否启用评论功能
4142 icp: 粤ICP备123456789号 # 备案号(可选)
Original file line number Diff line number Diff line change 66 "mkBlog/models"
77 "os"
88 "path"
9+ "strings"
910
1011 "go.yaml.in/yaml/v3"
1112)
@@ -94,7 +95,10 @@ func Init() {
9495 return
9596 }
9697
97- Cfg .Site .Server = fmt .Sprintf ("http://localhost:%d" , Cfg .Server .Port )
98+ if ! strings .Contains (Cfg .Site .Server , ":" ) {
99+ Cfg .Site .Server = fmt .Sprintf ("%s:%d" , Cfg .Site .Server , Cfg .Server .Port )
100+ }
101+
98102 Cfg .Site .DevMode = Cfg .Server .Devmode
99103
100104 if Cfg .TLS .Enabled {
Original file line number Diff line number Diff line change @@ -5,14 +5,14 @@ import "time"
55type ArticleSummary struct {
66 Title string `json:"title" gorm:"primaryKey"`
77 UpdateAt * time.Time `json:"updateAt" gorm:"autoUpdateTime;"`
8- Category string `json:"category" gorm:"type:VARCHAR (255)"`
8+ Category string `json:"category" gorm:"type:varchar (255)"`
99 Summary string `json:"summary" gorm:"type:TEXT"`
1010}
1111
1212type ArticleDetail struct {
1313 Title string `json:"title" gorm:"primaryKey"`
1414 CreateAt * time.Time `json:"createAt" gorm:"autoCreateTime;"`
1515 UpdateAt * time.Time `json:"updateAt" gorm:"autoUpdateTime;"`
16- Author string `json:"author" gorm:"type:VARCHAR(100 )"`
16+ Author string `json:"author" gorm:"type:varchar(255 )"`
1717 Content string `json:"content" gorm:"type:TEXT;index:ft_content,fulltext"`
1818}
You can’t perform that action at this time.
0 commit comments