追求个性与至简
- 前后端分离,使用React编写
- 日志页面
- 友链页面
- 适配移动端
- 代码行号显示
- 链接页面分组显示
- 相册页面
- 随机文章封面
- 2020-11-30 使用React重写主题
git clone https://github.com/xzhuz/halo-theme-react.git
cd halo-theme-react
# 安装
npm install
修改配置
根据自己本机环境修改 app/service/axios-config.js
。
const baseUrl = process.env.NODE_ENV === 'production' ? 'http://127.0.0.1:8090' : 'http://127.0.0.1:8090';
const apiAuth = process.env.NODE_ENV === 'production' ? '111111111111111' : '111111111111111';
启动
npm start
npm run deploy
只用配置Nginx就可以,下面给一个模板。
server {
listen 80;
server_name xxx.com;
location / {
proxy_pass http://localhost:7001;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host:$server_port;
}
location /api/ {
proxy_pass http://localhost:8080;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host:$server_port;
}
location /upload/ {
proxy_pass http://localhost:8080;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host:$server_port;
}
location /admin/ {
proxy_pass http://localhost:8080;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host:$server_port;
}
}