Astro 静态输出,构建为 dist/ 下的静态文件,客户端 JavaScript 很少
my-portfolio — Astro 作品集模板
作者 rkeshs
my-portfolio 是一个基于 Astro 的单页作品集模板,内容集中在一个 TypeScript 文件中管理,并附带 MDX 博客、RSS 与站点地图。
看看你的网站会是什么样
浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。
全部页面与视图 3
截图用于了解视觉与布局,交互效果请以实际项目为准。
值得关注的模板亮点
从已有项目资料中,快速了解它的特点。
单页作品集结构,覆盖个人简介、经历、技能、项目、奖项与教育区块
支持浅色/深色主题与减少动态效果偏好
内容集中在 src/lib/data.ts 管理,头像由 Astro 构建时生成 AVIF/JPEG 响应式变体
内置基于内容集合的 MDX 博客,并生成 RSS 订阅与站点地图
提供 Oxfmt 格式化、Oxlint 检查、TypeScript 与 Astro 诊断等脚本
模板详细介绍
my-portfolio 是开发者 Rishikesh S 开源的响应式单页作品集模板,使用 Astro 构建,样式由 Tailwind CSS 提供,构建产物为静态文件,客户端 JavaScript 很少。页面包含个人简介、工作经历、技能、项目、奖项与教育等区块,并支持浅色/深色主题和减少动态效果偏好。
内容维护方式比较集中:个人资料、首页与页脚文案、区块介绍、经历、技能、项目、奖项和教育信息都在 src/lib/data.ts 中编辑;头像替换 src/assets/profile.jpg 后由 Astro 在构建时生成响应式 AVIF 与 JPEG 变体。项目配图通过 selectedWork 条目的 artwork 字段映射到 ProjectArtwork.astro 中的分支。社交预览图位于 public/og.png,可依据 docs/og-image-source.html 重新截取。
博客部分基于 Astro 内容集合,在 src/content/blog 下新增 .md 或 .mdx 文件并填写 title、description、pubDate、draft 等 frontmatter 即可;draft 设为 false 后文章会进入 /blog、静态文章路由和站点地图,并出现在 /rss.xml 中。
使用前需要注意:README 要求 Bun 1.3.14 与 Node.js 22.12 或更新版本;本地开发通过 bun run dev 启动,默认地址为 http://localhost:4321。站点规范 URL 由 ORIGIN 环境变量决定,未设置时回退到 astro.config.ts 中配置的生产域名,影响 canonical、站点地图和 RSS。构建输出到 dist/,可部署到 Vercel 或任意静态托管。演示图片、字体、图标等第三方素材需按各自许可单独核对,代码本身采用 MIT 许可。
适合你的项目吗?
适用场景
- 开发者搭建个人作品集单页,展示经历、技能与项目
- 在作品集之外维护一个带 RSS 的静态技术博客
- 部署到 Vercel 或任意静态托管服务
- 以 MIT 许可的代码为基础进行修改和二次分发
适合人群
- 熟悉 Astro 或愿意按 README 使用 Bun 与 Node.js 的开发者
- 希望用单个 TypeScript 文件集中维护作品集内容的人
- 需要静态输出、低客户端 JavaScript 的个人站点
- 计划用 Markdown/MDX 写文章并输出 RSS 与站点地图的用户
上手与定制指南
结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。
- 1
环境要求:Bun 1.3.14,Node.js 22.12 或更新版本
- 2
克隆仓库后执行 bun install,再用 bun run dev 启动,默认访问 http://localhost:4321
- 3
需要覆盖站点 URL 时,将 .env.example 复制为 .env,ORIGIN 优先于 astro.config.ts 中的生产域名
- 4
个人资料、经历、技能、项目等改 src/lib/data.ts;头像替换 src/assets/profile.jpg
- 5
博客文章放在 src/content/blog,draft 设为 false 后才会进入列表、静态路由、站点地图与 RSS
授权与来源资料
使用条件与限制
免费使用 · 保留许可声明本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。
使用时需要遵守
- 允许免费使用、修改、商用和分发该版本代码。
- 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
- 代码按现状提供;担保与责任限制以原许可证及适用法律为准。
额外费用与待核对事项
- 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
- 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
- 使用该模板需要 Bun 1.3.14 与 Node.js 22.12 或更新版本,环境不满足则无法按 README 安装与构建。
- 站点规范 URL 由 ORIGIN 环境变量决定,未设置时回退到 astro.config.ts 中的生产域名,影响 canonical、站点地图与 RSS。
- 构建产物为 dist/ 下的静态文件,需自行部署到 Vercel 或任意静态托管服务,模板本身不提供托管。
- 模板默认集成 Vercel Analytics,使用该功能会涉及 Vercel 这一外部服务。
- 依赖被固定为精确版本,升级时需同时更新 package.json 与 bun.lock,否则可能出现版本不一致。
查看原文依据
Permission is hereby granted, free of charge
许可证原文
- [Bun 1.3.14](https://bun.sh/) - Node.js 22.12 or newer (required by Astro 7)
README 原文
Copy `.env.example` to `.env` when you need to override the site URL locally. `ORIGIN` takes precedence over the production URL that `astro.config.ts` falls back to
README 原文
The site builds to static files in `dist/` and can be deployed to Vercel or any static host.
README 原文
Static Astro output with Vercel Analytics
README 原文
https://github.com/rkeshs/my-portfolio/blob/main/LICENSEhttps://github.com/rkeshs/my-portfolio/blob/main/README.mdDependencies are pinned to exact versions in `package.json`; update `package.json` and `bun.lock` together with Bun.
README 原文
DeepSeek 根据仓库许可证和 README 整理 ·2026-10-04。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。
项目核对记录与介绍依据
模板资料
- 来源平台
- Astro Themes
- 资料与维护参考分
- 资料较完整 · 79 / 100
- 技术栈
- Astro
- 网站类型
- 作品集
这个分数如何计算
本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。
这个项目需要核对什么
- 记录的仓库更新时间
- 2026-09-13
- 截图检查日期
- 2026-10-04
已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。
目录记录的主要技术栈是 Astro。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。
查看具体选型方法 →介绍的制作与核对状态
介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。
审核声明: [email protected] · 2026-10-04
查看当时使用的来源资料
SHA-256: 5dec12bae230c62ffe35e9da0e119ce6357874ea90dfd6e3c96258f1937eb46a
2026-10-04T08:04:26.253Z
来源文件 / 仓库# Modern Portfolio Template A responsive portfolio template built with Astro 7 and Tailwind CSS 4, shipping almost no client-side JavaScript.  ## Features - Responsive single-page portfolio - Light and dark themes - Reduced-motion support - Static Astro output with Vercel Analytics - Self-hosted, preloaded fonts and responsive AVIF/JPEG images - Content managed from one TypeScript file - Type-safe MDX blog with RSS feed and sitemap generation ## Requirements - [Bun 1.3.14](https://bun.sh/) - Node.js 22.12 or newer (required by Astro 7) ## Local development ```bash git clone https://github.com/rkeshs/my-portfolio.git cd my-portfolio bun install bun run dev ``` Open `http://localhost:4321`. Copy `.env.example` to `.env` when you need to override the site URL locally. `ORIGIN` takes precedence over the production URL that `astro.config.ts` falls back to, so canonical URLs, the sitemap, and the RSS feed are correct in every environment. ## Commands | Command | Purpose | | ---------------------- | -------------------------------------------------- | | `bun run dev` | Start the development server | | `bun run check` | Run Astro and TypeScript diagnostics | | `bun run format` | Format supported files with Oxfmt | | `bun run format:check` | Check formatting without changing files | | `bun run lint` | Run Oxlint correctness and code-quality checks | | `bun run typecheck` | Run TypeScript and Astro diagnostics | | `bun run build` | Create the production build in `dist/` | | `bun run preview` | Preview the production build locally | | `bun run astro sync` | Regenerate Astro types after configuration changes | ## Update portfolio content Edit [`src/lib/data.ts`](src/lib/data.ts) to update personal details, hero and footer copy, section intros, work experience, skills, projects, awards, and education. Replace `src/assets/profile.jpg` to update the portrait; Astro generates the responsive AVIF and JPEG variants at build time. Each entry in `selectedWork` names its illustration through `artwork`, which maps to a branch of [`src/components/ProjectArtwork.astro`](src/components/ProjectArtwork.astro). The social preview image lives at `public/og.png`. Regenerate it from [`docs/og-image-source.html`](docs/og-image-source.html) with a 1200×630 screenshot after changing the copy. ## Publish a blog post Add an `.md` or `.mdx` file under [`src/content/blog`](src/content/blog) with this frontmatter: ```yaml --- title: "Post title" description: "A concise summary for lists and search results." pubDate: 2026-07-18 draft: true --- ``` Set `draft` to `false` to include the post in `/blog`, static article routes, and the sitemap. An optional `updatedDate` accepts the same date format. Published posts also appear in the RSS feed at `/rss.xml`. ## Production verification ```bash bun install --frozen-lockfile bun run astro sync bun run format:check bun run lint bun run typecheck bun run build ``` Dependencies are pinned to exact versions in `package.json`; update `package.json` and `bun.lock` together with Bun. ## Deployment The site builds to static files in `dist/` and can be deployed to Vercel or any static host. The canonical site URL comes from the `ORIGIN` environment variable, falling back to the production domain configured in `astro.config.ts`. ## License MIT © 2026 Rishikesh S.
看看同类模板
对比同技术栈与用途的模板,找到更适合的视觉与内容结构。

astro-theme-cactus
A simple Astro theme. Use it to create your blog or website.
Astro · 作品集

astrofy
Astrofy is a free and open-source template for your Personal Portfolio Website built with Astro and TailwindCS…
Astro · 作品集

astro-nano
Astro Nano is a static, minimalist, lightweight, lightning fast portfolio and blog.
Astro · 作品集

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

astro-sphere
Astro Sphere is a static, minimalist, lightweight, lightning fast portfolio and blog.
Astro · 作品集

astro-micro
Blog theme for Astro with search and comments built-in. Zero frameworks.
Astro · 作品集
