From a3c438aa4736572e89afcf4703e4f64c98220f05 Mon Sep 17 00:00:00 2001 From: RhenCloud Date: Sun, 9 Nov 2025 13:28:23 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9B=B4=E6=96=B0=20README=20=E5=92=8C?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E4=B8=AD=E7=9A=84=E9=A1=B9=E7=9B=AE=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=EF=BC=8C=E4=BF=AE=E6=AD=A3=E5=AF=BC=E8=88=AA=E6=A0=8F?= =?UTF-8?q?=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 43 +++++++++++++------------------------------ handlers/routes.py | 2 +- templates/footer.html | 2 +- 3 files changed, 15 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index c53e08c..9a93280 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# R2-Index +# Cloud-Index 一个支持多种云存储后端的文件管理、索引和浏览服务。 @@ -17,6 +17,13 @@ - 📱 响应式界面,多种设备尺寸支持 - 🌙 深色模式支持 +## 在线演示 + +你可以在在线演示中体验 Cloud Index 的主要功能(浏览、预览、上传、下载等)。 + +- Demo 地址:[https://r2.demo.cloud-index.rhen.cloud](https://r2.demo.cloud-index.rhen.cloud)(使用Cloudflare R2作为存储后端) +- Demo 地址:[https://github.demo.cloud-index.rhen.cloud](https://github.demo.cloud-index.rhen.cloud)(使用Github Repository作为存储后端) + ## TODO - [x] Github Repo 储存支持 @@ -39,8 +46,8 @@ ### 1. 克隆项目 ```bash -git clone https://github.com/RhenCloud/R2-Index.git -cd R2-Index +git clone https://github.com/RhenCloud/Cloud-Index.git +cd Cloud-Index ``` ### 2. 安装依赖 @@ -128,7 +135,7 @@ GITHUB_RAW_PROXY_URL=https://raw.fastgit.org ## 项目结构 ```bash -r2-index/ +cloud-index/ ├── app.py # Flask 应用主入口 ├── handlers/ │ └── routes.py # 路由处理器 @@ -189,36 +196,12 @@ r2-index/ 2. 在 Vercel 项目设置中配置环境变量 3. 部署 -### Docker 部署 - -您也可以使用 Docker 部署此应用: - -```dockerfile -FROM python:3.9-slim - -WORKDIR /app - -COPY requirements.txt . -RUN pip install --no-cache-dir -r requirements.txt - -COPY . . - -CMD ["python", "app.py"] -``` - -构建和运行: - -```bash -docker build -t r2-index . -docker run -p 5000:5000 --env-file .env r2-index -``` - ### 本地开发 ```bash # 1. 克隆项目 -git clone https://github.com/RhenCloud/R2-Index.git -cd R2-Index +git clone https://github.com/RhenCloud/Cloud-Index.git +cd Cloud-Index # 2. 创建虚拟环境 python -m venv venv diff --git a/handlers/routes.py b/handlers/routes.py index 334baa2..85be711 100644 --- a/handlers/routes.py +++ b/handlers/routes.py @@ -112,7 +112,7 @@ def build_entries(response: Dict[str, Any], prefix: str) -> List[Dict[str, Any]] def build_crumbs(prefix: str) -> List[Dict[str, str]]: - """根据当前前缀构建面包屑导航数据。""" + """根据当前前缀构建导航数据。""" crumbs: List[Dict[str, str]] = [] if prefix: segs = prefix.rstrip("/").split("/") diff --git a/templates/footer.html b/templates/footer.html index edda784..b4d7dad 100644 --- a/templates/footer.html +++ b/templates/footer.html @@ -2,7 +2,7 @@