hexo-generator-feed

通过hexo-generator-feed 创建tyep:atom的atom.xml文件,内容打开显示正常,但在浏览器打开/atom.xml时中文显示成乱码,在配置文件中添加如下修改.

或直接改成type:rss2类型

1
2
3
4
5
6
7
8
9
location = /atom.xml {
# 保持你原有的反代端口,这里假设是 4000
proxy_pass http://127.0.0.1:4000;
proxy_set_header Host $host;

# 核心:隐藏掉 Node 传过来的原始 Content-Type,由 Nginx 重新发送带 charset 的版本
proxy_hide_header Content-Type;
add_header Content-Type "application/atom+xml; charset=utf-8";
}