mirror of
https://github.com/RhenCloud/Cloud-Index.git
synced 2025-12-06 15:26:10 +08:00
fix: 更新 README 和模板中的项目名称,修正导航栏文档
This commit is contained in:
43
README.md
43
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
|
## TODO
|
||||||
|
|
||||||
- [x] Github Repo 储存支持
|
- [x] Github Repo 储存支持
|
||||||
@@ -39,8 +46,8 @@
|
|||||||
### 1. 克隆项目
|
### 1. 克隆项目
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/RhenCloud/R2-Index.git
|
git clone https://github.com/RhenCloud/Cloud-Index.git
|
||||||
cd R2-Index
|
cd Cloud-Index
|
||||||
```
|
```
|
||||||
|
|
||||||
### 2. 安装依赖
|
### 2. 安装依赖
|
||||||
@@ -128,7 +135,7 @@ GITHUB_RAW_PROXY_URL=https://raw.fastgit.org
|
|||||||
## 项目结构
|
## 项目结构
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
r2-index/
|
cloud-index/
|
||||||
├── app.py # Flask 应用主入口
|
├── app.py # Flask 应用主入口
|
||||||
├── handlers/
|
├── handlers/
|
||||||
│ └── routes.py # 路由处理器
|
│ └── routes.py # 路由处理器
|
||||||
@@ -189,36 +196,12 @@ r2-index/
|
|||||||
2. 在 Vercel 项目设置中配置环境变量
|
2. 在 Vercel 项目设置中配置环境变量
|
||||||
3. 部署
|
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
|
```bash
|
||||||
# 1. 克隆项目
|
# 1. 克隆项目
|
||||||
git clone https://github.com/RhenCloud/R2-Index.git
|
git clone https://github.com/RhenCloud/Cloud-Index.git
|
||||||
cd R2-Index
|
cd Cloud-Index
|
||||||
|
|
||||||
# 2. 创建虚拟环境
|
# 2. 创建虚拟环境
|
||||||
python -m venv venv
|
python -m venv venv
|
||||||
|
|||||||
@@ -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]]:
|
def build_crumbs(prefix: str) -> List[Dict[str, str]]:
|
||||||
"""根据当前前缀构建面包屑导航数据。"""
|
"""根据当前前缀构建导航数据。"""
|
||||||
crumbs: List[Dict[str, str]] = []
|
crumbs: List[Dict[str, str]] = []
|
||||||
if prefix:
|
if prefix:
|
||||||
segs = prefix.rstrip("/").split("/")
|
segs = prefix.rstrip("/").split("/")
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="container-footer">
|
<div class="container-footer">
|
||||||
<span>© {{ current_year if current_year else '2025' }} RhenCloud</span>
|
<span>© {{ current_year if current_year else '2025' }} RhenCloud</span>
|
||||||
<span>·</span>
|
<span>·</span>
|
||||||
<a href="https://github.com/RhenCloud/R2-Index" target="_blank" rel="noopener">GitHub</a>
|
<a href="https://github.com/RhenCloud/Cloud-Index" target="_blank" rel="noopener">GitHub</a>
|
||||||
<span>·</span>
|
<span>·</span>
|
||||||
<a href="mailto:i@rhen.cloud">联系</a>
|
<a href="mailto:i@rhen.cloud">联系</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user