From 754f7887b791b2ea1f61faa0f33f14333351ee99 Mon Sep 17 00:00:00 2001 From: deepzz0 Date: Mon, 10 Oct 2016 00:02:32 +0800 Subject: [PATCH] superfedder --- api.go | 11 +++-------- conf/app.yml | 2 ++ conf/tpl/feedTpl.xml | 1 + db.go | 1 - pingrpc.go | 1 - pingrpc2.go | 4 ++++ setting/setting.go | 1 + 7 files changed, 11 insertions(+), 10 deletions(-) delete mode 100644 pingrpc.go create mode 100644 pingrpc2.go diff --git a/api.go b/api.go index 58bedac..b1ff9dd 100644 --- a/api.go +++ b/api.go @@ -357,7 +357,6 @@ func apiTrashDelete(c *gin.Context) { return } } - c.JSON(http.StatusOK, nil) responseNotice(c, NOTICE_SUCCESS, "删除成功", "") } @@ -386,14 +385,10 @@ func apiTrashRecover(c *gin.Context) { } func responseNotice(c *gin.Context, typ, content, hl string) { - domain := setting.Conf.Mode.Domain - if i := strings.Index(domain, ":"); i > -1 { - domain = domain[0:i] - } if hl != "" { - c.SetCookie("notice_highlight", hl, 86400, "/", domain, true, false) + c.SetCookie("notice_highlight", hl, 86400, "/", "", true, false) } - c.SetCookie("notice_type", typ, 86400, "/", domain, true, false) - c.SetCookie("notice", fmt.Sprintf("[\"%s\"]", content), 86400, "/", domain, true, false) + c.SetCookie("notice_type", typ, 86400, "/", "", true, false) + c.SetCookie("notice", fmt.Sprintf("[\"%s\"]", content), 86400, "/", "", true, false) c.Redirect(http.StatusFound, c.Request.Referer()) } diff --git a/conf/app.yml b/conf/app.yml index 15e164f..cf0b79f 100644 --- a/conf/app.yml +++ b/conf/app.yml @@ -22,6 +22,8 @@ startid: 11 static: //st.deepzz.com # elasticsearch url searchurl: http://elasticsearch:9200 +# superfeedr shortname +superfeedr: deepzz # 评论相关 disqus: shortname: deepzz diff --git a/conf/tpl/feedTpl.xml b/conf/tpl/feedTpl.xml index 0d81fd0..edd0086 100644 --- a/conf/tpl/feedTpl.xml +++ b/conf/tpl/feedTpl.xml @@ -4,6 +4,7 @@ {{.Title}} https://{{.Domain}} + {{.SubTitle}} zh-CN {{.BuildDate}} diff --git a/db.go b/db.go index 340d4be..3d5d571 100644 --- a/db.go +++ b/db.go @@ -21,7 +21,6 @@ const ( DB = "eiblog" COLLECTION_ACCOUNT = "account" COLLECTION_ARTICLE = "article" - COUNTER_TAG = "tag" COUNTER_SERIE = "serie" COUNTER_ARTICLE = "article" SERIES_MD = "series_md" diff --git a/pingrpc.go b/pingrpc.go deleted file mode 100644 index 85f0393..0000000 --- a/pingrpc.go +++ /dev/null @@ -1 +0,0 @@ -package main \ No newline at end of file diff --git a/pingrpc2.go b/pingrpc2.go new file mode 100644 index 0000000..23c7da7 --- /dev/null +++ b/pingrpc2.go @@ -0,0 +1,4 @@ +package main + +// baidu==>http://zhanzhang.baidu.com/tools/ping +// http://ping.baidu.com/ping/RPC2 diff --git a/setting/setting.go b/setting/setting.go index 2ef6e84..d17ac5b 100644 --- a/setting/setting.go +++ b/setting/setting.go @@ -34,6 +34,7 @@ type Config struct { StartID int32 // 文章起始id Static string // cdn地址 SearchURL string // elasticsearch 地址 + Superfeedr string // superfeedr Disqus struct { // 获取文章数量相关 ShortName string PublicKey string