mirror of
https://github.com/eiblog/eiblog.git
synced 2026-03-01 00:34:58 +08:00
superfedder
This commit is contained in:
11
api.go
11
api.go
@@ -357,7 +357,6 @@ func apiTrashDelete(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
c.JSON(http.StatusOK, nil)
|
|
||||||
responseNotice(c, NOTICE_SUCCESS, "删除成功", "")
|
responseNotice(c, NOTICE_SUCCESS, "删除成功", "")
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -386,14 +385,10 @@ func apiTrashRecover(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func responseNotice(c *gin.Context, typ, content, hl string) {
|
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 != "" {
|
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_type", typ, 86400, "/", "", true, false)
|
||||||
c.SetCookie("notice", fmt.Sprintf("[\"%s\"]", content), 86400, "/", domain, true, false)
|
c.SetCookie("notice", fmt.Sprintf("[\"%s\"]", content), 86400, "/", "", true, false)
|
||||||
c.Redirect(http.StatusFound, c.Request.Referer())
|
c.Redirect(http.StatusFound, c.Request.Referer())
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ startid: 11
|
|||||||
static: //st.deepzz.com
|
static: //st.deepzz.com
|
||||||
# elasticsearch url
|
# elasticsearch url
|
||||||
searchurl: http://elasticsearch:9200
|
searchurl: http://elasticsearch:9200
|
||||||
|
# superfeedr shortname
|
||||||
|
superfeedr: deepzz
|
||||||
# 评论相关
|
# 评论相关
|
||||||
disqus:
|
disqus:
|
||||||
shortname: deepzz
|
shortname: deepzz
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
<title>{{.Title}}</title>
|
<title>{{.Title}}</title>
|
||||||
<link>https://{{.Domain}}</link>
|
<link>https://{{.Domain}}</link>
|
||||||
<atom:link href="https://{{.Domain}}/rss.html" rel="self"/>
|
<atom:link href="https://{{.Domain}}/rss.html" rel="self"/>
|
||||||
|
<atom:link href="https://{{.Superfeedr}}.superfeedr.com/" rel="hub"/>
|
||||||
<description>{{.SubTitle}}</description>
|
<description>{{.SubTitle}}</description>
|
||||||
<language>zh-CN</language>
|
<language>zh-CN</language>
|
||||||
<lastBuildDate>{{.BuildDate}}</lastBuildDate>
|
<lastBuildDate>{{.BuildDate}}</lastBuildDate>
|
||||||
|
|||||||
1
db.go
1
db.go
@@ -21,7 +21,6 @@ const (
|
|||||||
DB = "eiblog"
|
DB = "eiblog"
|
||||||
COLLECTION_ACCOUNT = "account"
|
COLLECTION_ACCOUNT = "account"
|
||||||
COLLECTION_ARTICLE = "article"
|
COLLECTION_ARTICLE = "article"
|
||||||
COUNTER_TAG = "tag"
|
|
||||||
COUNTER_SERIE = "serie"
|
COUNTER_SERIE = "serie"
|
||||||
COUNTER_ARTICLE = "article"
|
COUNTER_ARTICLE = "article"
|
||||||
SERIES_MD = "series_md"
|
SERIES_MD = "series_md"
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
package main
|
|
||||||
4
pingrpc2.go
Normal file
4
pingrpc2.go
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
// baidu==>http://zhanzhang.baidu.com/tools/ping
|
||||||
|
// http://ping.baidu.com/ping/RPC2
|
||||||
@@ -34,6 +34,7 @@ type Config struct {
|
|||||||
StartID int32 // 文章起始id
|
StartID int32 // 文章起始id
|
||||||
Static string // cdn地址
|
Static string // cdn地址
|
||||||
SearchURL string // elasticsearch 地址
|
SearchURL string // elasticsearch 地址
|
||||||
|
Superfeedr string // superfeedr
|
||||||
Disqus struct { // 获取文章数量相关
|
Disqus struct { // 获取文章数量相关
|
||||||
ShortName string
|
ShortName string
|
||||||
PublicKey string
|
PublicKey string
|
||||||
|
|||||||
Reference in New Issue
Block a user