mirror of
https://github.com/eiblog/eiblog.git
synced 2026-02-04 13:52:26 +08:00
rename mode.domain-> mode.domains
This commit is contained in:
2
back.go
2
back.go
@@ -109,7 +109,7 @@ func HandlePost(c *gin.Context) {
|
|||||||
h["Title"] = "撰写文章 | " + Ei.BTitle
|
h["Title"] = "撰写文章 | " + Ei.BTitle
|
||||||
}
|
}
|
||||||
h["Path"] = c.Request.URL.Path
|
h["Path"] = c.Request.URL.Path
|
||||||
h["Domain"] = setting.Conf.Mode.Domain
|
h["Domain"] = setting.Conf.Mode.Domains[0]
|
||||||
h["Series"] = Ei.Series
|
h["Series"] = Ei.Series
|
||||||
var tags []T
|
var tags []T
|
||||||
for tag, _ := range Ei.Tags {
|
for tag, _ := range Ei.Tags {
|
||||||
|
|||||||
19
conf/app.yml
19
conf/app.yml
@@ -15,7 +15,7 @@ pingrpcs:
|
|||||||
- http://ping.baidu.com/ping/RPC2
|
- http://ping.baidu.com/ping/RPC2
|
||||||
- http://blogsearch.google.com/ping/RPC2
|
- http://blogsearch.google.com/ping/RPC2
|
||||||
- http://rpc.pingomatic.com/
|
- http://rpc.pingomatic.com/
|
||||||
# 一般配置
|
# 常规配置
|
||||||
general:
|
general:
|
||||||
# 首页展示文章数量
|
# 首页展示文章数量
|
||||||
pagenum: 10
|
pagenum: 10
|
||||||
@@ -57,13 +57,17 @@ kodo:
|
|||||||
secretkey: BIrMy0fsZ0_SHNceNXk3eDuo7WmVYzj2-zrmd5Tf
|
secretkey: BIrMy0fsZ0_SHNceNXk3eDuo7WmVYzj2-zrmd5Tf
|
||||||
# 运行模式
|
# 运行模式
|
||||||
mode:
|
mode:
|
||||||
|
# http server
|
||||||
enablehttp: true
|
enablehttp: true
|
||||||
httpport: 9000
|
httpport: 9000
|
||||||
enablehttps: false
|
# https server
|
||||||
httpsport: 443
|
enablehttps: true
|
||||||
certfile: conf/certs/domain.pem
|
autocert: true
|
||||||
keyfile: conf/certs/domain.key
|
httpsport: 9001
|
||||||
domain: deepzz.com
|
certfile: conf/ssl/domain.rsa.pem
|
||||||
|
keyfile: conf/ssl/domain.rsa.key
|
||||||
|
domains:
|
||||||
|
- deepzz.com
|
||||||
# twitter地址: twitter.com/chenqijing2
|
# twitter地址: twitter.com/chenqijing2
|
||||||
twitter:
|
twitter:
|
||||||
card: summary
|
card: summary
|
||||||
@@ -71,8 +75,7 @@ twitter:
|
|||||||
image: st.deepzz.com/static/img/avatar.jpg
|
image: st.deepzz.com/static/img/avatar.jpg
|
||||||
address: twitter.com/chenqijing2
|
address: twitter.com/chenqijing2
|
||||||
|
|
||||||
# 以下数据项供初始化使用,仅首次运行有效。
|
# 数据初始化操作,可到博客后台修改
|
||||||
# 若需要修改,请到博客后台操作。
|
|
||||||
account:
|
account:
|
||||||
# *后台登录用户名
|
# *后台登录用户名
|
||||||
username: deepzz
|
username: deepzz
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
# like 192.168.99.100:true
|
||||||
|
|||||||
17
front.go
17
front.go
@@ -55,14 +55,15 @@ func StaticVersion(c *gin.Context) (version int) {
|
|||||||
|
|
||||||
func GetBase() gin.H {
|
func GetBase() gin.H {
|
||||||
return gin.H{
|
return gin.H{
|
||||||
"BlogName": Ei.BlogName,
|
"BlogName": Ei.BlogName,
|
||||||
"SubTitle": Ei.SubTitle,
|
"SubTitle": Ei.SubTitle,
|
||||||
"Twitter": setting.Conf.Twitter,
|
"Twitter": setting.Conf.Twitter,
|
||||||
"CopyYear": time.Now().Year(),
|
"CopyYear": time.Now().Year(),
|
||||||
"BTitle": Ei.BTitle,
|
"BTitle": Ei.BTitle,
|
||||||
"BeiAn": Ei.BeiAn,
|
"BeiAn": Ei.BeiAn,
|
||||||
"Domain": setting.Conf.Mode.Domain,
|
"Domain": setting.Conf.Mode.Domains[0],
|
||||||
"Kodo": setting.Conf.Kodo,
|
"Kodo": setting.Conf.Kodo,
|
||||||
|
"ShortName": setting.Conf.Disqus.ShortName,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
4
glide.lock
generated
4
glide.lock
generated
@@ -1,5 +1,5 @@
|
|||||||
hash: bd360fa297ed66950543990f9433cdcdf13c29dd99d9a01b49027e236b2cb9da
|
hash: bd360fa297ed66950543990f9433cdcdf13c29dd99d9a01b49027e236b2cb9da
|
||||||
updated: 2017-07-08T12:15:52.531289524+08:00
|
updated: 2017-07-08T14:52:31.866715976+08:00
|
||||||
imports:
|
imports:
|
||||||
- name: github.com/boj/redistore
|
- name: github.com/boj/redistore
|
||||||
version: 4562487a4bee9a7c272b72bfaeda4917d0a47ab9
|
version: 4562487a4bee9a7c272b72bfaeda4917d0a47ab9
|
||||||
@@ -8,7 +8,7 @@ imports:
|
|||||||
- name: github.com/eiblog/blackfriday
|
- name: github.com/eiblog/blackfriday
|
||||||
version: c0ec111761ae784fe31cc076f2fa0e2d2216d623
|
version: c0ec111761ae784fe31cc076f2fa0e2d2216d623
|
||||||
- name: github.com/eiblog/utils
|
- name: github.com/eiblog/utils
|
||||||
version: ad2f63940c4f16d0dbfc3f4df59e8cb7af0f80ec
|
version: 5699bde749ca1053867528834492263f841620ad
|
||||||
subpackages:
|
subpackages:
|
||||||
- logd
|
- logd
|
||||||
- mgo
|
- mgo
|
||||||
|
|||||||
8
ping.go
8
ping.go
@@ -25,7 +25,7 @@ func (*superfeedr) PingFunc(slug string) {
|
|||||||
}
|
}
|
||||||
vals := url.Values{}
|
vals := url.Values{}
|
||||||
vals.Set("hub.mode", "publish")
|
vals.Set("hub.mode", "publish")
|
||||||
vals.Add("hub.url", "https://"+setting.Conf.Mode.Domain+"/post/"+slug+".html")
|
vals.Add("hub.url", "https://"+setting.Conf.Mode.Domains[0]+"/post/"+slug+".html")
|
||||||
res, err := http.PostForm(setting.Conf.FeedrURL, vals)
|
res, err := http.PostForm(setting.Conf.FeedrURL, vals)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logd.Error(err)
|
logd.Error(err)
|
||||||
@@ -64,7 +64,7 @@ func (p *pingRPC) PingFunc(slug string) {
|
|||||||
if len(setting.Conf.PingRPCs) == 0 {
|
if len(setting.Conf.PingRPCs) == 0 {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
p.Params.Param[1].Value = "https://" + setting.Conf.Mode.Domain + "/post/" + slug + ".html"
|
p.Params.Param[1].Value = "https://" + setting.Conf.Mode.Domains[0] + "/post/" + slug + ".html"
|
||||||
buf := &bytes.Buffer{}
|
buf := &bytes.Buffer{}
|
||||||
buf.WriteString(xml.Header)
|
buf.WriteString(xml.Header)
|
||||||
enc := xml.NewEncoder(buf)
|
enc := xml.NewEncoder(buf)
|
||||||
@@ -98,9 +98,9 @@ func init() {
|
|||||||
pr := &pingRPC{MethodName: "weblogUpdates.extendedPing"}
|
pr := &pingRPC{MethodName: "weblogUpdates.extendedPing"}
|
||||||
pr.Params.Param = [4]rpcValue{
|
pr.Params.Param = [4]rpcValue{
|
||||||
0: rpcValue{Value: Ei.BTitle},
|
0: rpcValue{Value: Ei.BTitle},
|
||||||
1: rpcValue{Value: "https://" + setting.Conf.Mode.Domain},
|
1: rpcValue{Value: "https://" + setting.Conf.Mode.Domains[0]},
|
||||||
2: rpcValue{},
|
2: rpcValue{},
|
||||||
3: rpcValue{Value: "https://" + setting.Conf.Mode.Domain + "/rss.html"},
|
3: rpcValue{Value: "https://" + setting.Conf.Mode.Domains[0] + "/rss.html"},
|
||||||
}
|
}
|
||||||
Pings = append(Pings, pr)
|
Pings = append(Pings, pr)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ func TestPingRPC(t *testing.T) {
|
|||||||
}
|
}
|
||||||
pr.Params.Param = [4]rpcValue{
|
pr.Params.Param = [4]rpcValue{
|
||||||
rpcValue{Value: Ei.BTitle},
|
rpcValue{Value: Ei.BTitle},
|
||||||
rpcValue{Value: "https://" + setting.Conf.Mode.Domain},
|
rpcValue{Value: "https://" + setting.Conf.Mode.Domains[0]},
|
||||||
rpcValue{Value: "https://deepzz.com/post/gdb-debug.html"},
|
rpcValue{Value: "https://deepzz.com/post/gdb-debug.html"},
|
||||||
rpcValue{Value: "https://deepzz.com/rss.html"},
|
rpcValue{Value: "https://deepzz.com/rss.html"},
|
||||||
}
|
}
|
||||||
|
|||||||
31
router.go
31
router.go
@@ -9,6 +9,7 @@ import (
|
|||||||
"github.com/eiblog/eiblog/setting"
|
"github.com/eiblog/eiblog/setting"
|
||||||
"github.com/eiblog/utils/logd"
|
"github.com/eiblog/utils/logd"
|
||||||
"github.com/eiblog/utils/tmpl"
|
"github.com/eiblog/utils/tmpl"
|
||||||
|
"github.com/gin-gonic/autotls"
|
||||||
"github.com/gin-gonic/contrib/sessions"
|
"github.com/gin-gonic/contrib/sessions"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
@@ -104,15 +105,27 @@ func Run() {
|
|||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
if setting.Conf.Mode.EnableHttps {
|
if setting.Conf.Mode.EnableHttps {
|
||||||
go func() {
|
if setting.Conf.Mode.AutoCert {
|
||||||
logd.Infof("https server Running on %d\n", setting.Conf.Mode.HttpsPort)
|
go func() {
|
||||||
err = router.RunTLS(fmt.Sprintf(":%d", setting.Conf.Mode.HttpsPort), setting.Conf.Mode.CertFile, setting.Conf.Mode.KeyFile)
|
logd.Info("https server Running on 443")
|
||||||
if err != nil {
|
err = autotls.Run(router, setting.Conf.Mode.Domains...)
|
||||||
logd.Info("ListenAndServe: ", err)
|
if err != nil {
|
||||||
time.Sleep(100 * time.Microsecond)
|
logd.Info("ListenAndServe: ", err)
|
||||||
endRunning <- true
|
time.Sleep(100 * time.Microsecond)
|
||||||
}
|
endRunning <- true
|
||||||
}()
|
}
|
||||||
|
}()
|
||||||
|
} else {
|
||||||
|
go func() {
|
||||||
|
logd.Infof("https server Running on %d\n", setting.Conf.Mode.HttpsPort)
|
||||||
|
err = router.RunTLS(fmt.Sprintf(":%d", setting.Conf.Mode.HttpsPort), setting.Conf.Mode.CertFile, setting.Conf.Mode.KeyFile)
|
||||||
|
if err != nil {
|
||||||
|
logd.Info("ListenAndServe: ", err)
|
||||||
|
time.Sleep(100 * time.Microsecond)
|
||||||
|
endRunning <- true
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
<-endRunning
|
<-endRunning
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
DEV = "dev"
|
DEV = "dev" // 该模式会输出 debug 等信息
|
||||||
PROD = "prod"
|
PROD = "prod" // 该模式用于生产环境
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -63,7 +63,8 @@ type Config struct {
|
|||||||
HttpsPort int
|
HttpsPort int
|
||||||
CertFile string
|
CertFile string
|
||||||
KeyFile string
|
KeyFile string
|
||||||
Domain string
|
AutoCert bool
|
||||||
|
Domains []string
|
||||||
}
|
}
|
||||||
Twitter struct { // twitter信息
|
Twitter struct { // twitter信息
|
||||||
Card string
|
Card string
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<!DOCTYPE html><html lang="zh-cn"><head><meta charset="utf-8"><meta content="width=device-width,minimum-scale=1.0" name="viewport"><meta name="format-detection" content="telephone=no"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="referrer" content="always"><title>{{.Title}}</title><script>!function(n,t){function e(){o("nls",1)}function c(){t.documentElement.style.display="none",u(),location.reload()}function r(n){var t="";try{t=f[n]||"",t.length<99&&c()}catch(e){u()}return t}function i(n,t){try{f[n]=t,t!==f[n]&&u()}catch(e){u()}}function o(n,e){var c=999;e||(c=-1),c=new Date(+new Date+864e5*c).toGMTString();var r=n+"="+e+";path=/;secure;expires="+c;t.cookie=r}function a(n){var e=t.getElementById(n).innerHTML;i(n,e)}function l(e,c){var i=r(e),o=t.createElement(c?"script":"style");return n.execScript&&c?n.execScript(i):(o.innerHTML=i,void t.head.appendChild(o))}function u(){o("v",0)}var f,h=function(){},d=n.L={h:h,l:h,c:h};try{f=localStorage,d.h=a,d.l=l,d.c=o}catch(p){e()}}(this,document);</script>{{if .Version}}<script>L.c('v', {{.Version}})</script>{{end}}<link rel="apple-touch-icon" href="//{{.Kodo.Domain}}/static/img/favicon.ico"><link rel="search" type="application/opensearchdescription+xml" href="//{{.Domain}}/opensearch.xml" title="{{.BTitle}}">{{if .Version}}<style id="blog_css">{{template "blog_css"}}</style><script>L.h('blog_css')</script>{{else}}<script>L.l("blog_css")</script>{{end}}<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="//{{.Domain}}/rss.html"><meta name="description" content="{{.Description}}"><meta name="twitter:card" content={{.Twitter.Card}}><meta name="twitter:site" content="@{{.Twitter.Site}}"><meta name="twitter:title" content="{{.Title}}"><meta name="twitter:description" content="{{.Description}}"><meta name="twitter:image" content="https://{{.Twitter.Image}}"></head><body><div class="container"><div class="left-col"><div class="intrude-less"><header id="header" class="inner"><div class="profilepic"><a href="/"></a></div><h1><a href="/">{{.BlogName}}</a></h1><p class="subtitle">{{.SubTitle}}</p><nav id="main-nav"><ul><li {{if eq .Path "/"}}class="on" {{end}}><a href="/"><span>首页</span></a></li><li {{if eq .Path "/series.html"}}class="on" {{end}}><a href="/series.html"><span>专题</span></a></li><li {{if eq .Path "/archives.html"}}class="on" {{end}}><a href="/archives.html"><span>归档</span></a></li><li {{if eq .Path "/post/blogroll.html"}}class="on" {{end}}><a href="/post/blogroll.html"><span>友链</span></a></li><li {{if eq .Path "/post/about.html"}}class="on" {{end}}><a href="/post/about.html"><span>关于</span></a></li></ul></nav><nav id="sub-nav"><div class="social"><a target="_blank" class="twitter external" rel="nofollow" href="//{{.Twitter.Address}}" title="Twitter" aria-label="Twitter">Twitter</a><a target="_blank" class="rss" href="//{{.Domain}}/rss.html" title="RSS 订阅" aria-label="RSS 订阅">RSS</a><a class="search" href="/search.html" title="站内搜索" aria-label="站内搜索">Search</a></div></nav></header></div></div><div class="mid-col"><div class="mid-col-container">{{.LayoutContent}}</div><footer id=footer class=inner>© {{.CopyYear}} - {{.BTitle}} - <a target="_blank" rel="nofollow designer" class="external beian" href="http://www.miitbeian.gov.cn/">{{.BeiAn}}</a><br>Powered by <a target=_blank href="//github.com/eiblog/eiblog">Eiblog</a> & <a target=_blank rel="nofollow designer" class=external href="//imququ.com">JerryQu</a></footer></div></div><input type=hidden id=CURRENT_PAGE value="{{.CurrentPage}}"><input type=hidden id=CDN_DOMAIN value="//{{.Kodo.Domain}}">{{if .Version}}<script id="ana_js">{{template "ana_js"}}</script><script>L.h('ana_js')</script>{{else}}<script>L.l('ana_js', 1)</script>{{end}}{{if .Version}}<script id="jq_js">{{template "jq_js"}}</script><script>L.h('jq_js')</script>{{else}}<script>L.l('jq_js', 1)</script>{{end}}{{if .Version}}<script id="hl_js">{{template "hl_js"}}</script><script>L.h('hl_js')</script>{{else}}<script>L.l('hl_js', 1)</script>{{end}}{{if .Version}}<script id="blog_js">{{template "blog_js"}}</script><script>L.h('blog_js')</script>{{else}}<script>L.l('blog_js', 1)</script>{{end}}</body></html>
|
<!DOCTYPE html><html lang="zh-cn"><head><meta charset="utf-8"><meta content="width=device-width,minimum-scale=1.0" name="viewport"><meta name="format-detection" content="telephone=no"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="referrer" content="always"><title>{{.Title}}</title><script>!function(n,t){function e(){o("nls",1)}function c(){t.documentElement.style.display="none",u(),location.reload()}function r(n){var t="";try{t=f[n]||"",t.length<99&&c()}catch(e){u()}return t}function i(n,t){try{f[n]=t,t!==f[n]&&u()}catch(e){u()}}function o(n,e){var c=999;e||(c=-1),c=new Date(+new Date+864e5*c).toGMTString();var r=n+"="+e+";path=/;secure;expires="+c;t.cookie=r}function a(n){var e=t.getElementById(n).innerHTML;i(n,e)}function l(e,c){var i=r(e),o=t.createElement(c?"script":"style");return n.execScript&&c?n.execScript(i):(o.innerHTML=i,void t.head.appendChild(o))}function u(){o("v",0)}var f,h=function(){},d=n.L={h:h,l:h,c:h};try{f=localStorage,d.h=a,d.l=l,d.c=o}catch(p){e()}}(this,document);</script>{{if .Version}}<script>L.c('v', {{.Version}})</script>{{end}}<link rel="apple-touch-icon" href="//{{.Kodo.Domain}}/static/img/favicon.ico"><link rel="search" type="application/opensearchdescription+xml" href="//{{.Domain}}/opensearch.xml" title="{{.BTitle}}">{{if .Version}}<style id="blog_css">{{template "blog_css" .}}</style><script>L.h('blog_css')</script>{{else}}<script>L.l("blog_css")</script>{{end}}<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="//{{.Domain}}/rss.html"><meta name="description" content="{{.Description}}"><meta name="twitter:card" content={{.Twitter.Card}}><meta name="twitter:site" content="@{{.Twitter.Site}}"><meta name="twitter:title" content="{{.Title}}"><meta name="twitter:description" content="{{.Description}}"><meta name="twitter:image" content="https://{{.Twitter.Image}}"></head><body><div class="container"><div class="left-col"><div class="intrude-less"><header id="header" class="inner"><div class="profilepic"><a href="/"></a></div><h1><a href="/">{{.BlogName}}</a></h1><p class="subtitle">{{.SubTitle}}</p><nav id="main-nav"><ul><li {{if eq .Path "/"}}class="on" {{end}}><a href="/"><span>首页</span></a></li><li {{if eq .Path "/series.html"}}class="on" {{end}}><a href="/series.html"><span>专题</span></a></li><li {{if eq .Path "/archives.html"}}class="on" {{end}}><a href="/archives.html"><span>归档</span></a></li><li {{if eq .Path "/post/blogroll.html"}}class="on" {{end}}><a href="/post/blogroll.html"><span>友链</span></a></li><li {{if eq .Path "/post/about.html"}}class="on" {{end}}><a href="/post/about.html"><span>关于</span></a></li></ul></nav><nav id="sub-nav"><div class="social"><a target="_blank" class="twitter external" rel="nofollow" href="//{{.Twitter.Address}}" title="Twitter" aria-label="Twitter">Twitter</a><a target="_blank" class="rss" href="//{{.Domain}}/rss.html" title="RSS 订阅" aria-label="RSS 订阅">RSS</a><a class="search" href="/search.html" title="站内搜索" aria-label="站内搜索">Search</a></div></nav></header></div></div><div class="mid-col"><div class="mid-col-container">{{.LayoutContent}}</div><footer id=footer class=inner>© {{.CopyYear}} - {{.BTitle}} - <a target="_blank" rel="nofollow designer" class="external beian" href="http://www.miitbeian.gov.cn/">{{.BeiAn}}</a><br>Powered by <a target=_blank href="//github.com/eiblog/eiblog">Eiblog</a> & <a target=_blank rel="nofollow designer" class=external href="//imququ.com">JerryQu</a></footer></div></div><input type=hidden id=CURRENT_PAGE value="{{.CurrentPage}}"><input type=hidden id=CDN_DOMAIN value="//{{.Kodo.Domain}}">{{if .Version}}<script id="ana_js">{{template "ana_js"}}</script><script>L.h('ana_js')</script>{{else}}<script>L.l('ana_js', 1)</script>{{end}}{{if .Version}}<script id="jq_js">{{template "jq_js"}}</script><script>L.h('jq_js')</script>{{else}}<script>L.l('jq_js', 1)</script>{{end}}{{if .Version}}<script id="hl_js">{{template "hl_js"}}</script><script>L.h('hl_js')</script>{{else}}<script>L.l('hl_js', 1)</script>{{end}}{{if .Version}}<script id="blog_js">{{template "blog_js" .}}</script><script>L.h('blog_js')</script>{{else}}<script>L.l('blog_js', 1)</script>{{end}}</body></html>
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
10
xml.go
10
xml.go
@@ -43,7 +43,7 @@ func doFeed() {
|
|||||||
params := map[string]interface{}{
|
params := map[string]interface{}{
|
||||||
"Title": Ei.BTitle,
|
"Title": Ei.BTitle,
|
||||||
"SubTitle": Ei.SubTitle,
|
"SubTitle": Ei.SubTitle,
|
||||||
"Domain": setting.Conf.Mode.Domain,
|
"Domain": setting.Conf.Mode.Domains[0],
|
||||||
"FeedrURL": setting.Conf.FeedrURL,
|
"FeedrURL": setting.Conf.FeedrURL,
|
||||||
"BuildDate": buildDate.Format(time.RFC1123Z),
|
"BuildDate": buildDate.Format(time.RFC1123Z),
|
||||||
"Artcs": artcs,
|
"Artcs": artcs,
|
||||||
@@ -69,7 +69,7 @@ func doSitemap() {
|
|||||||
logd.Error("not found sitemapTpl.")
|
logd.Error("not found sitemapTpl.")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
params := map[string]interface{}{"Artcs": Ei.Articles, "Domain": setting.Conf.Mode.Domain}
|
params := map[string]interface{}{"Artcs": Ei.Articles, "Domain": setting.Conf.Mode.Domains[0]}
|
||||||
f, err := os.OpenFile("static/sitemap.xml", os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0666)
|
f, err := os.OpenFile("static/sitemap.xml", os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0666)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logd.Error(err)
|
logd.Error(err)
|
||||||
@@ -93,7 +93,7 @@ func doOpensearch() {
|
|||||||
params := map[string]string{
|
params := map[string]string{
|
||||||
"BTitle": Ei.BTitle,
|
"BTitle": Ei.BTitle,
|
||||||
"SubTitle": Ei.SubTitle,
|
"SubTitle": Ei.SubTitle,
|
||||||
"Domain": setting.Conf.Mode.Domain,
|
"Domain": setting.Conf.Mode.Domains[0],
|
||||||
}
|
}
|
||||||
f, err := os.OpenFile("static/opensearch.xml", os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0666)
|
f, err := os.OpenFile("static/opensearch.xml", os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0666)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -115,7 +115,7 @@ func doRobots() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
params := map[string]string{
|
params := map[string]string{
|
||||||
"Domain": setting.Conf.Mode.Domain,
|
"Domain": setting.Conf.Mode.Domains[0],
|
||||||
}
|
}
|
||||||
f, err := os.OpenFile("static/robots.txt", os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0666)
|
f, err := os.OpenFile("static/robots.txt", os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0666)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -137,7 +137,7 @@ func doCrossdomain() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
params := map[string]string{
|
params := map[string]string{
|
||||||
"Domain": setting.Conf.Mode.Domain,
|
"Domain": setting.Conf.Mode.Domains[0],
|
||||||
}
|
}
|
||||||
f, err := os.OpenFile("static/crossdomain.xml", os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0666)
|
f, err := os.OpenFile("static/crossdomain.xml", os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0666)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user