Skip to content

Commit eafb1de

Browse files
committed
修复导航栏高亮和sitemap报404的问题
1 parent 1ac225d commit eafb1de

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+15
-27429
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,5 @@ sitemap
5656
sitemap.xml
5757
*_test.go
5858
store
59-
*.sh
59+
*.sh
60+
DocHub.exe~

controllers/HomeControllers/IndexController.go

-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ func (this *IndexController) Get() {
4040
modelCate := models.NewCategory()
4141
//首页分类显示
4242
_, this.Data["Cates"] = modelCate.GetAll(true)
43-
//获取最新的文档数据,这里News不是新闻的意思
4443
this.Data["Latest"], _, _ = models.NewDocument().SimpleList(fmt.Sprintf("d.`Id` in(%v)", strings.Trim(this.Sys.Trends, ",")), 5)
4544
this.Data["Seo"] = models.NewSeo().GetByPage("PC-Index", "文库首页", "文库首页", "文库首页", this.Sys.Site)
4645
this.Data["IsHome"] = true

controllers/HomeControllers/ListController.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ func (this *ListController) Get() {
9494
lists, rows, err := models.GetDocList(0, helper.Interface2Int(chanels[0]["Id"]), pid, cid, p, listRows, "Id", 0, 1)
9595

9696
this.Data["PageId"] = "wenku-list"
97-
this.Data["Chanel"] = strings.ToLower(chanel)
97+
this.Data["Chanel"] = chanel
9898
this.Data["CurChanel"] = chanels[0]
9999
this.Data["CurPid"] = pid
100100
this.Data["CurCid"] = cid

models/CloudStoreModel.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
package models
22

33
import (
4+
"errors"
45
"fmt"
56
"io/ioutil"
67
"os"
78
"strings"
89

9-
"github.com/pkg/errors"
10-
1110
"github.com/PuerkitoBio/goquery"
1211

1312
CloudStore2 "github.com/TruthHun/CloudStore"

models/SeoModel.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package models
22

33
import (
4+
"path/filepath"
45
"strings"
56
"time"
67

@@ -130,7 +131,7 @@ func (this *Seo) BuildSitemap() {
130131
})
131132
}
132133
}
133-
if err := Sitemap.CreateSitemapIndex(si, "sitemap.xml"); err != nil {
134+
if err := Sitemap.CreateSitemapIndex(si, filepath.Join(helper.RootPath, "sitemap.xml")); err != nil {
134135
helper.Logger.Error("sitemap生成失败:" + err.Error())
135136
}
136137
helper.Logger.Info(fmt.Sprintf("[%v]更新站点地图[end]", time.Now().Format("2006-01-02 15:04:05")))

vendor/github.com/astaxie/beego/CONTRIBUTING.md

-52
This file was deleted.

vendor/github.com/astaxie/beego/LICENSE

-13
This file was deleted.

vendor/github.com/astaxie/beego/README.md

-61
This file was deleted.

0 commit comments

Comments
 (0)