Compare commits

...

7 Commits

Author SHA1 Message Date
henry.chen
4ebd5d8b34 chore(release): 3.0.11 2026-01-04 09:54:34 +08:00
henry.chen
14b4534c1e fix: title in xml not escape 2026-01-04 09:54:25 +08:00
Deepzz
0fdd8e0bd6 Update domain from st.deepzz.com to st.deepzz.cn 2025-11-12 10:33:22 +08:00
henry.chen
b75f7d6a96 chore(release): 3.0.10 2025-11-12 09:43:51 +08:00
henry.chen
5aa8152802 fix: default RUN_MODE=prod 2025-11-12 09:43:48 +08:00
henry.chen
1a9628a5dc chore(release): 3.0.9 2025-11-12 09:34:03 +08:00
henry.chen
71c02266bc fix: image RUN_MODE 2025-11-12 09:33:49 +08:00
6 changed files with 40 additions and 11 deletions

View File

@@ -2,6 +2,27 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
### [3.0.11](https://github.com/eiblog/eiblog/compare/v3.0.10...v3.0.11) (2026-01-04)
### Bug Fixes
* title in xml not escape ([14b4534](https://github.com/eiblog/eiblog/commit/14b4534c1e034684b19808168ad0fbf5464e18ef))
### [3.0.10](https://github.com/eiblog/eiblog/compare/v3.0.9...v3.0.10) (2025-11-12)
### Bug Fixes
* default RUN_MODE=prod ([5aa8152](https://github.com/eiblog/eiblog/commit/5aa81528027eca648e430503a1f5a04118ca650e))
### [3.0.9](https://github.com/eiblog/eiblog/compare/v3.0.8...v3.0.9) (2025-11-12)
### Bug Fixes
* image RUN_MODE ([71c0226](https://github.com/eiblog/eiblog/commit/71c02266bc0173a4af1ffc876dc36051377e1af0))
### [3.0.8](https://github.com/eiblog/eiblog/compare/v3.0.7...v3.0.8) (2025-10-14)

View File

@@ -28,9 +28,12 @@ var Conf Config
// load config file
func init() {
// run mode
mode := config.RunMode(os.Getenv("RUN_MODE"))
if !mode.IsRunMode() {
panic("config: unsupported env RUN_MODE: " + mode)
mode := config.RunModeProd
if m := os.Getenv("RUN_MODE"); m != "" {
mode = config.RunMode(m)
if !mode.IsRunMode() {
panic("config: unsupported env RUN_MODE: " + mode)
}
}
logrus.Infof("Run mode:%s", mode)

View File

@@ -43,9 +43,12 @@ type Config struct {
// init 初始化配置
func init() {
// run mode
mode := config.RunMode(os.Getenv("RUN_MODE"))
if !mode.IsRunMode() {
panic("config: unsupported env RUN_MODE: " + mode)
mode := config.RunModeProd
if rm := os.Getenv("RUN_MODE"); rm != "" {
mode = config.RunMode(rm)
if !mode.IsRunMode() {
panic("config: unsupported env RUN_MODE: " + mode)
}
}
logrus.Infof("Run mode:%s", mode)

View File

@@ -40,13 +40,13 @@ google: # 谷歌分析
adsense: <script async src="https://pagead2.googlesyndication.com/xxx" crossorigin="anonymous"></script>
qiniu: # 七牛OSS
bucket: eiblog
domain: st.deepzz.com
domain: st.deepzz.cn
accesskey: MB6AXl_Sj_mmFsL-Lt59Dml2Vmy2o8XMmiCbbSeC
secretkey: BIrMy0fsZ0_SHNceNXk3eDuo7WmVYzj2-zrmd5Tf
twitter: # twitter card
card: summary
site: deepzz02
image: st.deepzz.com/static/img/avatar.jpg
image: st.deepzz.cn/static/img/avatar.jpg
address: twitter.com/deepzz02
feedrpc: # rss ping
feedrurl: https://deepzz.superfeedr.com/

View File

@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{.Title}}</title>
<title>{{xmlescape .Title}}</title>
<link>https://{{.Host}}</link>
<description>{{.SubTitle}}</description>
<description>{{xmlescape .SubTitle}}</description>
<atom:link href="https://{{.Host}}/rss.html" rel="self" />
<atom:link href="{{.FeedrURL}}" rel="hub" />
<language>zh-CN</language>
<lastBuildDate>{{.BuildDate}}</lastBuildDate>
{{range .Articles}}
<item>
<title>{{.Title}}</title>
<title>{{xmlescape .Title}}</title>
<link>https://{{$.Host}}/post/{{.Slug}}.html</link>
<comments>https://{{$.Host}}/post/{{.Slug}}.html#comments</comments>
<guid>https://{{$.Host}}/post/{{.Slug}}.html</guid>

View File

@@ -3,6 +3,7 @@ package tools
import (
"encoding/base64"
"html"
htmpl "html/template"
"io"
"log"
@@ -26,6 +27,7 @@ func init() {
TplFuncMap["isnotzero"] = IsNotZero
TplFuncMap["getavatar"] = GetAvatar
TplFuncMap["imgtonormal"] = ImgToNormal
TplFuncMap["xmlescape"] = html.EscapeString
}
// Str2html string to html