From 13aefb3e211a4bf402f623b9bb160c2d79b16fe1 Mon Sep 17 00:00:00 2001 From: deepzz0 Date: Sun, 2 Oct 2016 19:43:27 +0800 Subject: [PATCH] rm rss search in app.yml --- conf/app.yml | 5 ----- front.go | 2 -- setting/setting.go | 38 ++++++++++++++++++-------------------- views/homeLayout.html | 2 +- 4 files changed, 19 insertions(+), 28 deletions(-) diff --git a/conf/app.yml b/conf/app.yml index 99f96ee..fdc07dc 100644 --- a/conf/app.yml +++ b/conf/app.yml @@ -46,11 +46,6 @@ modes: domain: deepzz.com # twitter地址: //twitter.com/chenqijing2 twitter: //twitter.com/chenqijing2 -# rss地址 -rss: /rss.html -# search地址 -search: /search.html - # 以下数据初始化用,可在后台修改 account: # *后台登录用户名 diff --git a/front.go b/front.go index c0f2290..a75df25 100644 --- a/front.go +++ b/front.go @@ -66,8 +66,6 @@ func GetBase() gin.H { "BlogName": Ei.BlogName, "SubTitle": Ei.SubTitle, "Twitter": setting.Conf.Twitter, - "RSS": setting.Conf.RSS, - "Search": setting.Conf.Search, "CopyYear": time.Now().Year(), "BTitle": Ei.BTitle, "BeiAn": Ei.BeiAn, diff --git a/setting/setting.go b/setting/setting.go index ba5fa64..d4e530b 100644 --- a/setting/setting.go +++ b/setting/setting.go @@ -22,29 +22,27 @@ var ( ) type Config struct { - StaticVersion int - RunMode string - Trash int - Clean int - PageNum int - PageSize int - Length int - Identifier string - Favicon string - StartID int32 - Static string - SearchURL string - Disqus struct { + StaticVersion int // 当前静态文件版本 + RunMode string // 运行模式 + Trash int // 回收箱文章保留时间 + Clean int // 清理回收箱频率 + PageNum int // 前端每页文章数量 + PageSize int // 后台每页文章数量 + Length int // 自动截取预览长度 + Identifier string // 截取标示 + Favicon string // icon地址 + StartID int32 // 文章起始id + Static string // cdn地址 + SearchURL string // elasticsearch 地址 + Disqus struct { // 获取文章数量相关 ShortName string PublicKey string URL string Interval int } - Modes map[string]RunMode - Twitter string - RSS string - Search string - Blogger struct { + Modes map[string]RunMode // 运行模式 + Twitter string // twitter地址 + Blogger struct { // 初始化数据 BlogName string SubTitle string BeiAn string @@ -52,8 +50,8 @@ type Config struct { Copyright string } Account struct { - Username string - Password string + Username string // * + Password string // * Email string PhoneNumber string Address string diff --git a/views/homeLayout.html b/views/homeLayout.html index 55b4df6..a3a0fd5 100644 --- a/views/homeLayout.html +++ b/views/homeLayout.html @@ -1 +1 @@ -{{.Title}}{{if .Version}}{{end}}{{if .Version}}{{else}}{{end}}
{{if .HomePage}} {{template "home" .}} {{else if .ArticlePage}} {{template "article" .}}{{else if .SeriesPage}}{{template "series" .}}{{else if .ArchivesPage}}{{template "archives" .}} {{else if .BlogrollPage}}{{template "blogroll" .}}{{else if .AboutPage}}{{template "about" .}}{{else if .SearchPage}} {{template "search" .}}{{else if .NotFoundPage}}{{template "notfound"}} {{end}}
{{if .Version}}{{else}}{{end}}{{if .Version}}{{else}}{{end}}{{if .Version}}{{else}}{{end}}{{if .Version}}{{else}}{{end}} \ No newline at end of file +{{.Title}}{{if .Version}}{{end}}{{if .Version}}{{else}}{{end}}
{{if .HomePage}} {{template "home" .}} {{else if .ArticlePage}} {{template "article" .}}{{else if .SeriesPage}}{{template "series" .}}{{else if .ArchivesPage}}{{template "archives" .}} {{else if .BlogrollPage}}{{template "blogroll" .}}{{else if .AboutPage}}{{template "about" .}}{{else if .SearchPage}} {{template "search" .}}{{else if .NotFoundPage}}{{template "notfound"}} {{end}}
{{if .Version}}{{else}}{{end}}{{if .Version}}{{else}}{{end}}{{if .Version}}{{else}}{{end}}{{if .Version}}{{else}}{{end}} \ No newline at end of file