NuxtVue作品集

esfahani-nuxt-theme — Nuxt 作品集模板

作者 aynzad

Esfahani Theme 是一个基于 Nuxt 的双语个人网站与博客主题,文章内容来自 Prismic,项目页自动抓取 GitHub 公开仓库,并支持用 Gemini 将项目页自动翻译为波斯语。

看看你的网站会是什么样

浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。

3 个预览视图
桌面端首页1 / 3
桌面端截图首屏预览

由服务器浏览器实际访问页面后截取。

全部页面与视图 3

截图用于了解视觉与布局,交互效果请以实际项目为准。

采集于 2026-10-03查看来源

值得关注的模板亮点

从已有项目资料中,快速了解它的特点。

01

通过 @nuxtjs/i18n 支持英语与波斯语(RTL)双语站点

02

文章、关于与联系页面由 Prismic 无头 CMS 提供,仓库附带对应自定义类型定义

03

项目页自动抓取 GitHub 公开仓库,展示名称、描述、topics、star 数与演示链接

04

波斯语项目页可经 Vercel AI SDK 调用 Google Gemini 在服务端翻译并按字符串缓存,无密钥时回退英文

05

支持 SSR、按语言生成 sitemap(含文章图片)、canonical、og:image 与 hreflang

06

使用 @nuxt/fonts 自托管 Josefin Sans、Open Sans 与 Vazirmatn 字体

模板详细介绍

Esfahani Theme 是一个面向个人网站或博客的 Nuxt 主题,采用 MIT 许可发布,作者为 aynzad,线上演示站点为 esfahani.dev。主题的核心定位是双语(英语与波斯语 RTL)内容站点,通过 @nuxtjs/i18n 实现语言切换与 RTL 布局。

内容层面分为三块:文章、关于与联系页面由 Prismic 无头 CMS 提供,仓库内附带了 about、contact、articles 三个自定义类型定义文件,需要在 Prismic 中按这些结构创建;文章使用 Shiki 做代码高亮,并按语言区分内容。项目页则通过 GitHub REST API 自动列出指定账号的公开仓库,排除 fork 与归档仓库,按最近活动排序,每张卡片展示仓库名、描述、topics、star 数与主页链接。

在波斯语路由下,项目页的仓库名、描述与 topics 会通过 Vercel AI SDK 调用 Google Gemini 在服务端翻译,并按字符串缓存;未配置 Gemini 密钥时回退显示英文。站点支持 SSR、按语言生成 sitemap(含文章图片)、canonical、og:image 与 hreflang,并可选接入 GA4。字体使用 @nuxt/fonts 自托管 Josefin Sans、Open Sans 与 Vazirmatn。

使用限制方面:主题依赖 Prismic 作为文章与页面内容的来源,需要自行注册并配置仓库;项目页依赖 GitHub API,未配置只读 token 时受每小时 60 次请求限制;波斯语自动翻译依赖 Gemini API 密钥,属于外部服务。README 的 TODO 中仍有一项未完成——姓名、职位描述等字段尚未改为从 Prismic 动态读取。

Nuxt作品集

适合你的项目吗?

适用场景

  • 搭建需要英语与波斯语(RTL)双版本的个人网站或博客
  • 用 Prismic 管理文章、关于与联系页面内容,并希望按语言区分文章
  • 希望项目展示页自动同步 GitHub 公开仓库,而不手动维护项目列表
  • 需要为波斯语访客自动翻译项目页内容,同时保留英文回退
  • 需要 SSR 页面并配置 sitemap、hreflang、canonical 与可选 GA4 统计

适合人群

  • 有 Prismic 使用经验或愿意注册 Prismic 仓库的个人开发者
  • 需要英语与波斯语双语、且接受 RTL 布局的博客或作品集作者
  • 希望项目列表由 GitHub 公开仓库自动生成、而非手工维护的开发者
  • 能提供 Gemini API 密钥以启用波斯语自动翻译的站点维护者
  • 使用 pnpm 与 TypeScript 工作流、并可能部署到 Vercel 的前端开发者

上手与定制指南

结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。

  1. 1

    克隆仓库后执行 pnpm install,并将 .env.sample 复制为 .env 进行配置

  2. 2

    需在 Prismic 创建仓库,按仓库内 .prismic-custom-types 下的 about.json、contact.json、articles.json 建立对应自定义类型,并把 API 端点填入 NUXT_PUBLIC_API_URL

  3. 3

    NUXT_PUBLIC_SITE_URL 为必填,用于 sitemap、canonical、og:image 与 hreflang;NUXT_PUBLIC_GITHUB_USERNAME 为项目页所需

  4. 4

    NUXT_GITHUB_TOKEN 为可选只读 PAT,用于提升 GitHub API 每小时 60 次的请求上限;NUXT_GEMINI_API_KEY 为空时波斯语项目页显示英文

  5. 5

    NUXT_OG_IMAGE_SECRET 用于动态 OG 图片端点,留空则禁用该功能;NUXT_PUBLIC_GOOGLE_ANALYTICS_ID 仅接受 GA4 的 G-XXXX 格式

查看仓库使用说明

授权与来源资料

使用条件与限制

免费使用 · 保留许可声明

本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。

使用时需要遵守

  • 允许免费使用、修改、商用和分发该版本代码。
  • 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
  • 代码按现状提供;担保与责任限制以原许可证及适用法律为准。

额外费用与待核对事项

  • 使用该主题的文章、关于与联系页面内容必须依赖 Prismic 无头 CMS,需自行注册 Prismic 账号并创建仓库,将 API 端点填入 NUXT_PUBLIC_API_URL,并按仓库内 about.json、contact.json、articles.json 建立对应自定义类型。
  • 项目页依赖 GitHub REST API,必须配置 NUXT_PUBLIC_GITHUB_USERNAME 指定要展示的 GitHub 账号;未配置只读 PAT(NUXT_GITHUB_TOKEN)时受 GitHub 每小时 60 次请求限制。
  • 波斯语项目页自动翻译依赖外部服务 Google Gemini,需提供 NUXT_GEMINI_API_KEY;未提供密钥时波斯语路由回退显示英文,不进行翻译。
  • 动态 OG 图片功能需要配置 NUXT_OG_IMAGE_SECRET;留空则禁用该端点,无法生成动态 OG 图片。
  • README 的 TODO 中仍有一项未完成:姓名、职位描述等字段尚未改为从 Prismic 动态读取,当前需在代码中静态维护。
  • 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
  • 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据

Permission is hereby granted, free of charge

许可证原文

Create your [prismic](http://prismic.io/dashboard/signup) account.

README 原文

`NUXT_PUBLIC_GITHUB_USERNAME` | for Projects | GitHub account whose public repos are listed

README 原文

`NUXT_GEMINI_API_KEY` | no | Gemini key to auto-translate Projects into Farsi (empty = Farsi shows English)

README 原文

`NUXT_OG_IMAGE_SECRET` | for OG | Secret used by the OG image endpoint; empty disables dynamic OG images

README 原文

- [ ] Make name, job description, and similar fields dynamic by pulling them from Prismic

README 原文
https://github.com/aynzad/esfahani-nuxt-theme/blob/master/LICENSEhttps://github.com/aynzad/esfahani-nuxt-theme/blob/master/README.md

DeepSeek 根据仓库许可证和 README 整理 ·2026-10-03。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。

项目核对记录与介绍依据

模板资料

来源平台
GitHub
资料与维护参考分
资料较完整 · 83 / 100
技术栈
Nuxt · Vue
网站类型
作品集
这个分数如何计算

本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。

这个项目需要核对什么

记录的仓库更新时间
2026-05-28
截图检查日期
2026-10-03

已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。

目录记录的主要技术栈是 Nuxt。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。

查看具体选型方法 →

介绍的制作与核对状态

介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。

已完成服务器许可规则与 AI 来源核对;未经过人工编辑审核。

查看当时使用的来源资料

SHA-256: a1992920314d1238111c532a056f02eb66df511dfe456860aac1cbf8888d1851

2026-10-03T04:58:29.405Z

来源文件 / 仓库
<p align="center"><img align="center" style="width:320px" src="./public/android-chrome-512x512.png"/></p><br/>
<p align="center">
    <span><img src="https://badgen.net/badge/license/MIT/blue" alt="license"></span>
    <span><img src="https://badgen.net/github/releases/aynzad/esfahani-nuxt-theme" alt="release"></span>
    <span><img src="https://badgen.net/github/last-commit/aynzad/esfahani-nuxt-theme" alt="last commit"></span>
    <span><img src="https://badgen.net/github/commits/aynzad/esfahani-nuxt-theme" alt="commits"></span>
    <span><img src="https://badgen.net/github/open-issues/aynzad/esfahani-nuxt-theme" alt="open issues"></span>
</p>

# Esfahani Theme

The **Esfahani Theme** is a multilingue NuxtJs theme which aims to modernize, organize and enhance some aspects of personal website or weblog themes development.

## Live Demo

Live production demo is available on [esfahani.dev](https://esfahani.dev).

## Features

- **Bilingual** — English and Farsi (RTL) via `@nuxtjs/i18n`.
- **Articles** — authored in Prismic, rendered with Shiki code highlighting and per-locale content.
- **Projects** — auto-populated from a GitHub account's public repos (stars, topics, demo links).
- **Farsi auto-translation** — the Projects page is translated on the server with Google Gemini (Vercel AI SDK), cached per string, with graceful fallback to English.
- **SSR + SEO** — server-rendered pages, sitemap (both locales, with article images), and GA4 analytics.
- **Self-hosted fonts** — Josefin Sans, Open Sans, and Vazirmatn via `@nuxt/fonts`.
- **Typed & linted** — TypeScript throughout, ESLint flat config.

## How it works:

- [Nuxt 4](https://nuxt.com/) (Vue 3, Nitro) SSR
- [Prismic](https://prismic.io/) headless CMS for articles/about/contact
- [GitHub REST API](https://docs.github.com/rest) powers the **Projects** page (public repos)
- [Vercel AI SDK](https://ai-sdk.dev/) + [Google Gemini](https://ai.google.dev/) to auto-translate the Projects page into Farsi
- [@nuxtjs/i18n](https://i18n.nuxtjs.org/) — English / Farsi (RTL)
- [Vercel](https://vercel.com/) deployment (auto-detected by Nitro)
- [TypeScript](https://typescriptlang.org/)
- [SASS](http://sass-lang.com/) preprocessor for CSS
- [pnpm](https://pnpm.io/) package manager

## Setup

### Install the project:

```shell
$ git clone https://github.com/aynzad/esfahani-nuxt-theme.git
$ pnpm install
$ cp .env.sample .env
```

Then run it:

```shell
$ pnpm dev      # dev server
$ pnpm build    # production build
```

### Create a `Prismic` repository

1. Create your [prismic](http://prismic.io/dashboard/signup) account.
1. [Create a repository](https://prismic.io/dashboard/new-repository)
1. Set `NUXT_PUBLIC_API_URL` in `.env` to your repository API endpoint.
1. Create a `about` custom type, using [about.json](./.prismic-custom-types/about.json) file.
1. Create a `contact` custom type, using [contact.json](./.prismic-custom-types/contact.json) file.
1. Create a `articles` custom type, using [articles.json](./.prismic-custom-types/articles.json) file.

### Environment variables

Configured in `.env` (see [.env.sample](./.env.sample)):

| Variable                          | Required     | Purpose                                                                                  |
| --------------------------------- | ------------ | ---------------------------------------------------------------------------------------- |
| `NUXT_PUBLIC_API_URL`             | yes          | Prismic repository API endpoint                                                          |
| `NUXT_PUBLIC_SITE_URL`            | yes          | Canonical site origin (no trailing slash); powers sitemap, canonical, og:image, hreflang |
| `NUXT_PUBLIC_GOOGLE_ANALYTICS_ID` | no           | GA4 measurement id (`G-XXXX`); legacy `UA-*` values are ignored                          |
| `NUXT_PUBLIC_PAGE_SIZE`           | no           | Articles per page on listing routes (default `10`)                                       |
| `NUXT_PUBLIC_IS_STAGING`          | no           | Flag staging deploys, e.g. for robots/noindex toggles (default `false`)                  |
| `NUXT_PUBLIC_GITHUB_USERNAME`     | for Projects | GitHub account whose public repos are listed                                             |
| `NUXT_GITHUB_TOKEN`               | no           | Read-only PAT to lift GitHub's 60 req/hr limit                                           |
| `NUXT_GEMINI_API_KEY`             | no           | Gemini key to auto-translate Projects into Farsi (empty = Farsi shows English)           |
| `NUXT_GEMINI_MODEL`               | no           | Override Gemini model (default `gemini-2.5-flash`)                                       |
| `NUXT_OG_IMAGE_SECRET`            | for OG       | Secret used by the OG image endpoint; empty disables dynamic OG images                   |

### Projects page

The Projects page lists the public repositories of `NUXT_PUBLIC_GITHUB_USERNAME` (forks/archived excluded, newest activity first). Each card shows the repo name, description, topics, star count, and a demo link when the repo has a homepage. On the Farsi route the names/descriptions/topics are translated on the server via Gemini (cached per string); without a key it falls back to English.

### Deploy on `Vercel` _(optional)_

You can use [Vercel](https://vercel.com/) for CI and CD your own fork of this project.

1. Create your [Vercel](https://vercel.com/signup) account.
1. [Create a Project](https://vercel.com/new) and import **your** git repository.

## Contributing

Great that you are considering supporting the project. You have a lot of ways to help me grow. I appreciate all contributions, even the smallest.

- Report an issue.
- Propose a feature.
- Send a pull request.
- Star project on the [GitHub](https://github.com/aynzad/esfahani-nuxt-theme)
- Tell about project around your community.

## TODO

- [x] Implement projects page
- [x] Improve SEO and accessibility
- [x] Add RSS feed (RSS 2.0, Atom, JSON Feed; per-locale).
- [x] Config test packages (like `vitest`) and Add unit test
- [ ] Make name, job description, and similar fields dynamic by pulling them from Prismic

## License

It is licensed under the [MIT license](http://opensource.org/licenses/MIT).
反馈内容错误

看看同类模板

对比同技术栈与用途的模板,找到更适合的视觉与内容结构。