Skip to content
nianzhibaiPublic

About

A Gallery for Beauty

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

XGallery 图标

XGallery

XGallery 是一个精致优雅的多模特图集展示项目,提供丝滑、沉浸的照片浏览体验

项目基于 Next.js 和 TypeScript,使用 Tailwind CSS、shadcn/ui 和 Motion 构建界面与动画,采用 SQLite 和 Drizzle 管理数据,并通过 PhotoSwipe 提供大图浏览体验

仿照 栖光集 设计,栖光集仓库

图集目录要求

Albums/                       # ALBUMS_DIR
├── 模特 A/
│   ├── 图集一/
│   │   ├── 01.jpg
│   │   ├── 02.jpg
│   │   └── 03.png
│   └── 图集二/
│       ├── 01.webp
│       └── 02.jpg
├── 模特 B/
│   ├── 01.jpg
│   └── 02.jpg
└── @未分类/
    └── 图集三/
        ├── 01.jpg
        └── 02.jpg

Docker 部署

下载 compose.yaml

curl -fLO https://raw.githubusercontent.com/nianzhibai/XGallery/main/compose.yaml

编辑 compose.yaml,将 ./albums:/albums:ro 中的 ./albums 改为已有图集目录的绝对路径。启动容器并建立图集索引

docker compose up -d
docker compose exec xgallery npm run albums:sync

同步完成后,访问 http://服务器IP:3000,更多配置见 Docker 部署说明

源码部署

需要 Node.js >= 22.12.0 以及 npm,克隆项目并安装依赖

git clone https://github.com/nianzhibai/XGallery.git
cd XGallery
npm ci
cp .env.example .env.local

编辑 .env.local 配置参数,然后建立图集索引、构建并启动:

npm run albums:sync
npm run build
npm start

访问 http://服务器IP:3000

Cloudflare 配置

Cloudflare 配置说明

API 调用

支持使用 API key 调用接口(默认关闭),详情见 API 调用文档

使用须知

请遵守法律法规

About

A Gallery for Beauty

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages