基于 Astro 构建的静态照片画廊模板
memori — Astro 启动器模板
作者 hant121
基于 Astro 的静态照片画廊模板,图片托管于 Cloudinary,支持时间线视图、灯箱与明暗模式。
看看你的网站会是什么样
浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。
目前有 1 张原始预览,可打开完整图片查看设计细节。
截图用于了解视觉与布局,交互效果请以实际项目为准。
值得关注的模板亮点
从已有项目资料中,快速了解它的特点。
图片托管于 Cloudinary,自动获取并展示对应文件夹中的照片
支持时间线视图与 Fancybox 灯箱浏览
提供明暗模式、自定义主题色与横幅
画廊内容通过 Markdown frontmatter 管理,可记录地点、相机、日期等元数据
附带新建画廊、上传 Cloudinary、HEIC 转换等 pnpm 脚本
模板详细介绍
Memori 是一个用 Astro 构建的静态照片画廊网站模板,灵感来自 Fuwari。它把图片放在 Cloudinary 上,页面通过读取对应文件夹自动展示照片,并支持时间线视图、Fancybox 灯箱、明暗模式、自定义主题色与横幅,以及响应式布局。画廊内容以 Markdown 文件管理,可在 frontmatter 中填写标题、发布日期、描述、封面图、拍摄地点和相机型号等元数据。
使用前需要注册 Cloudinary 并在 .env 中配置凭据,图片需上传到 galleries/<gallery-name>/ 目录下。项目提供 pnpm 脚本用于新建画廊、批量上传图片、转换 HEIC 等操作。模板使用 Tailwind CSS v3 而非 v4,这是为兼容当前配置而做的选择。
该模板采用 MIT 许可,可免费使用、修改和分发,但演示图片来自 Unsplash,字体、图标等第三方素材需单独核对许可。Cloudinary 等外部服务可能产生费用。
适合你的项目吗?
适用场景
- 搭建个人摄影作品展示网站
- 为旅行或活动照片创建带时间线的在线相册
- 需要将图片托管在 Cloudinary 并自动优化的静态站点
- 使用 Astro 和 Tailwind CSS v3 快速启动画廊类项目
适合人群
- 熟悉 Astro 与 Markdown 内容管理的开发者
- 愿意使用 Cloudinary 作为图片存储和优化服务的用户
- 需要明暗模式、灯箱和时间线视图的照片展示场景
上手与定制指南
结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。
- 1
需要 Node.js 20 及以上版本,并使用 pnpm 安装依赖
- 2
需注册 Cloudinary 并在 .env 中配置 PUBLIC_CLOUDINARY_CLOUD_NAME、CLOUDINARY_API_KEY、CLOUDINARY_API_SECRET 或 CLOUDINARY_URL
- 3
图片需上传至 Cloudinary 的 galleries/<gallery-name>/ 文件夹,可通过 pnpm upload-cloudinary 脚本或手动上传
- 4
使用 pnpm new-gallery <name> 创建画廊,并在 src/content/galleries/<name>/index.md 中填写 frontmatter
- 5
部署前需在 astro.config.mjs 中修改站点配置,并在部署平台设置 Cloudinary 环境变量
授权与来源资料
使用条件与限制
免费使用 · 保留许可声明本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。
使用时需要遵守
- 允许免费使用、修改、商用和分发该版本代码。
- 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
- 代码按现状提供;担保与责任限制以原许可证及适用法律为准。
额外费用与待核对事项
- 使用该模板必须注册 Cloudinary 账户并配置凭据,图片存储与优化依赖此外部服务,可能产生费用或受其服务条款限制。
- 图片不能本地存储,必须上传至 Cloudinary 的 galleries/<gallery-name>/ 文件夹,站点才能自动获取并展示照片。
- 部署时需在部署平台设置 Cloudinary 环境变量,否则图片无法正常加载。
- 演示图片来自 Unsplash,其许可与项目 MIT 代码许可相互独立,使用前需自行核对。
- 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
- 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据
Permission is hereby granted, free of charge
许可证原文
Sign up for a free account at [Cloudinary](https://cloudinary.com/)
README 原文
Images are stored on Cloudinary, not locally.
README 原文
Remember to set the Cloudinary environment variables in your deployment platform
README 原文
https://github.com/hant121/memori/blob/main/LICENSEhttps://github.com/hant121/memori/blob/main/README.mdAll images from Unsplash
README 原文
DeepSeek 根据仓库许可证和 README 整理 ·2026-10-04。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。
项目核对记录与介绍依据
模板资料
- 来源平台
- Astro Themes
- 资料与维护参考分
- 资料较完整 · 83 / 100
- 技术栈
- Astro
- 网站类型
- 启动器
这个分数如何计算
本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。
这个项目需要核对什么
- 记录的仓库更新时间
- 2026-03-27
- 截图检查日期
- 2026-10-04
已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。
目录记录的主要技术栈是 Astro。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。
查看具体选型方法 →介绍的制作与核对状态
介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。
审核声明: [email protected] · 2026-10-04
查看当时使用的来源资料
SHA-256: e4016901d6cb9baf65aca645de64c6a3c56086709d2366e9354a153e4331d896
2026-10-04T02:31:49.839Z
来源文件 / 仓库# 🌸 Memori



A static photo gallery website built with [Astro](https://astro.build). Inspired from [Fuwari](https://github.com/saicaca/fuwari).
> **Note:** This theme uses **Tailwind CSS v3** (not Tailwind v4). This is an intentional choice to maintain compatibility with the current configuration.
You can find the official Astro theme here:
https://astro.build/themes/details/a-static-photo-gallery-template-built-with-astro/
[**🖥️ Live Demo (Github Pages)**](https://codewithnemo.github.io/memori)
All images from Unsplash

## ✨ Features
- [x] Built with [Astro](https://astro.build) and [Tailwind CSS v3](https://tailwindcss.com) (Note: This theme uses Tailwind CSS v3, not Tailwind v4)
- [x] Smooth animations and page transitions
- [x] Light / dark mode
- [x] Customizable theme colors & banner
- [x] Responsive design
- [x] Photo gallery with timeline view
- [x] Image lightbox with [Fancybox](https://fancyapps.com/)
- [x] Cloudinary integration for image storage and optimization
- [x] Automatic image optimization and transformation
- [x] Gallery metadata (location, camera, date)
## 🚀 Getting Started
1. Clone this repository:
```sh
git clone https://github.com/codewithnemo/memori.git
cd memori
```
2. Install dependencies:
```sh
pnpm install
```
- Install [pnpm](https://pnpm.io) `npm install -g pnpm` if you haven't.
3. Set up Cloudinary:
- Sign up for a free account at [Cloudinary](https://cloudinary.com/)
- Get your Cloudinary credentials from the dashboard
- Create a `.env` file in the project root with the following variables:
```env
PUBLIC_CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
```
Or use the `CLOUDINARY_URL` format:
```env
CLOUDINARY_URL=cloudinary://api_key:api_secret@cloud_name
```
4. Edit the config file `src/config.ts` to customize your gallery website.
5. Create a new gallery:
```sh
pnpm new-gallery <gallery-name>
```
This creates a gallery entry in `src/content/galleries/<gallery-name>/index.md`.
6. Upload images to Cloudinary:
- Add your images to a local folder (e.g., `galleries/<gallery-name>/`)
- Upload them to Cloudinary using the upload script:
```sh
pnpm upload-cloudinary <gallery-name>
```
Or upload all galleries:
```sh
pnpm upload-cloudinary
```
- Or upload manually via Cloudinary dashboard to the folder `galleries/<gallery-name>/`
7. Deploy your gallery to Vercel, Netlify, GitHub Pages, etc. following [the guides](https://docs.astro.build/en/guides/deploy/).
- Remember to set the Cloudinary environment variables in your deployment platform
- Edit the site configuration in `astro.config.mjs` before deployment
## 📝 Frontmatter of Galleries
Create a gallery by running:
```sh
pnpm new-gallery <gallery-name>
```
Or manually create a folder in `src/content/galleries/` with an `index.md` file:
```yaml
---
title: My Gallery Title
published: 2026-01-01
description: Description of this gallery
image: cover.jpg # Optional: cover image filename from Cloudinary (or leave empty to use first image)
location: "City, Country" # Optional
camera: "Canon EOS R5" # Optional
---
```
**Important:** Images are stored on Cloudinary, not locally. Upload images to Cloudinary in the folder `galleries/<gallery-name>/`. The gallery will automatically fetch and display all images from the corresponding Cloudinary folder.
### Uploading Images to Cloudinary
1. **Using the upload script (recommended):**
- Place your images in a local folder (e.g., `galleries/<gallery-name>/`)
- Run: `pnpm upload-cloudinary <gallery-name>` (or `pnpm upload-cloudinary` to upload all galleries)
- Images will be uploaded to Cloudinary with the correct folder structure
2. **Manual upload via Cloudinary Dashboard:**
- Upload images to Cloudinary
- Ensure they are in the folder `galleries/<gallery-name>/`
- The `public_id` should include the folder path (e.g., `galleries/gallery1/image.jpg`)
## ⚡ Commands
All commands are run from the root of the project, from a terminal:
| Command | Action |
|:------------------------------------------------|:----------------------------------------------------|
| `pnpm install` | Installs dependencies |
| `pnpm dev` | Starts local dev server at `localhost:4321` |
| `pnpm build` | Build your production site to `./dist/` |
| `pnpm preview` | Preview your build locally, before deploying |
| `pnpm check` | Run checks for errors in your code |
| `pnpm format` | Format your code using Biome |
| `pnpm new-gallery <name>` | Create a new gallery |
| `pnpm upload-cloudinary [name]` | Upload images to Cloudinary (optionally for a specific gallery) |
| `pnpm upload-cloudinary` | Upload all galleries to Cloudinary |
| `pnpm convert-heic` | Convert HEIC images to JPEG |
| `pnpm delete-heic` | Delete HEIC images |
| `pnpm astro ...` | Run CLI commands like `astro add`, `astro check` |
| `pnpm astro --help` | Get help using the Astro CLI |
## 📄 License
This project is licensed under the MIT License.
看看同类模板
对比同技术栈与用途的模板,找到更适合的视觉与内容结构。

astrowind
⭕️ AstroWind: A free template using Astro v7 and Tailwind CSS v4. Astro starter theme.
Astro · 博客
accessible-astro-starter
Accessible Astro Starter 是一个以无障碍为核心理念的 Astro 6 启动模板,由 incluud 团队维护。
Astro · 博客

astro-erudite
An opinionated, unstyled static blogging template built with Astro and native CSS.
Astro · 作品集

astro-shopify
astro-shopify 是一个面向开发者的轻量级电商启动模板,用于构建基于 Shopify 的无头店面。
Astro · 电商

brutal
A neobrutalism Astro starter theme
Astro · 启动器

qwind
⭕️ Qwind: A template to make your website using Qwik + Tailwind CSS.
Astro · 工具站
