更新默认配置和使用说明
This commit is contained in:
20
README.md
20
README.md
@@ -6,18 +6,30 @@
|
||||
|
||||
本项目的侧重于功能实现,并未考虑任何性能优化,亦未考虑大规模部署的情况,由此带来的任何问题与项目无关。
|
||||
|
||||
## Feature
|
||||
## Get Started
|
||||
|
||||
- [x] 内容缓存
|
||||
- [x] CNAME 自定义域名
|
||||
安装 `go1.23` 或更高版本,同时安装 `Make` 工具 ,然后执行如下命令:
|
||||
|
||||
```bash
|
||||
make gitea-pages
|
||||
```
|
||||
|
||||
之后可使用如下命令启动
|
||||
|
||||
```bash
|
||||
./gitea-pages -conf config.yaml
|
||||
```
|
||||
|
||||
具体配置可查看 [`config.yaml`](./config.yaml)。
|
||||
|
||||
## TODO
|
||||
|
||||
- [x] 内容缓存
|
||||
- [x] CNAME 自定义域名
|
||||
- [ ] OAuth2 授权访问私有页面
|
||||
- [ ] ~~http01 自动签发证书~~: 交由 Caddy 完成
|
||||
- [ ] ~~Web 钩子触发更新~~: 对实时性需求不大
|
||||
|
||||
|
||||
## LICENSE
|
||||
|
||||
此项目使用 [Apache-2.0](./LICENSE)
|
||||
25
config.yaml
Normal file
25
config.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
# 服务器绑定地址
|
||||
bind: 127.0.0.1:18080
|
||||
# 基础域名
|
||||
domain: example.com
|
||||
auth:
|
||||
server: https://gitea.com
|
||||
# 需要 user , org , repo 的 read 全新
|
||||
token: token
|
||||
cache:
|
||||
# 配置存储
|
||||
storage: /path/to/config.json
|
||||
# 配置缓存时长
|
||||
ttl: 10m
|
||||
|
||||
# 单个文件最大缓存大小
|
||||
size: 10MB
|
||||
# 总缓存大小
|
||||
max: 1GB
|
||||
page:
|
||||
# 默认页面分支
|
||||
default_branch: gh-pages
|
||||
# 默认 404 页面模板
|
||||
404: /path/to/html.gotmpl
|
||||
# 默认 500 页面模板
|
||||
500: /path/to/html.gotmpl
|
||||
Reference in New Issue
Block a user