mirror of
https://github.com/eiblog/eiblog.git
synced 2026-02-04 22:02:26 +08:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4ebd5d8b34 | ||
|
|
14b4534c1e | ||
|
|
0fdd8e0bd6 | ||
|
|
b75f7d6a96 | ||
|
|
5aa8152802 | ||
|
|
1a9628a5dc | ||
|
|
71c02266bc |
21
CHANGELOG.md
21
CHANGELOG.md
@@ -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)
|
||||
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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/
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user