Astro作品集

career-portfolio-template — Astro 作品集模板

作者 nbakh16

基于 Astro 的数据驱动个人职业作品集模板,内容集中在 src/data/ 的 JSON 文件中,内置多套配色主题与浅色/深色模式,并自动生成 sitemap、robots.txt 与 llms.txt。

看看你的网站会是什么样

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

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

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

全部页面与视图 2

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

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

值得关注的模板亮点

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

01

内容集中在 src/data/ 的 JSON 文件中,修改个人资料与项目数据无需改动组件代码

02

src/config.ts 提供 default、strategic、innovator、executive 等内置配色,并自动处理浅色/深色模式切换

03

构建时自动生成 sitemap-index.xml 与 robots.txt,并提供 /llms.txt 路由输出面向 AI 爬虫的 Markdown 内容

04

SEO 字段(标题、描述、语言、职位、关键词、Twitter 卡片、OG 图片)统一在 src/data/home.json 中配置

05

使用 Tailwind CSS 与 astro-icon(Iconify 的 Material Design Icons 集合),图片放在 src/assets/ 下由 Astro 自动优化

模板详细介绍

这是一个用 Astro 构建的静态作品集模板,用于展示个人职业经历、技能与项目亮点。模板强调数据驱动:站点信息、项目数据等集中在 src/data/ 下的 JSON 文件中,修改内容不需要改动组件代码。样式使用 Tailwind CSS,图标通过 astro-icon 与 Iconify 的 Material Design Icons 集合引入,图片放在 src/assets/ 下可交给 Astro 自动优化。

配置方面,src/config.ts 提供 baseTheme 选项,可在 default、strategic、innovator、executive 等内置配色之间切换,并自动处理对应的浅色/深色模式切换。SEO 与 AI 可读性相关字段(siteUrl、webpageTitle、description、lang、jobTitle、keywords、twitterHandle、ogImageUrl)在 src/data/home.json 中维护,构建时自动生成 sitemap-index.xml 与 robots.txt,并通过 src/pages/llms.txt.ts 动态输出面向 LLM 爬虫的 Markdown 路由。

使用限制:README 提到后端为 FastAPI,但明确说明没有后端也能运行,开源版本即将发布,因此当前模板不包含后端功能。仓库采用 MIT 许可,免费范围仅限该版本代码;演示图片、字体、图标等第三方素材需按各自许可单独核对,域名、托管等外部服务可能另外收费。

Astro作品集

适合你的项目吗?

适用场景

  • 个人开发者或求职者搭建展示职业经历、技能与项目亮点的静态作品集站点
  • 需要把站点文案与项目数据从代码中分离、通过 JSON 文件维护内容的作品集项目
  • 希望站点自带 sitemap、robots.txt、Open Graph/Twitter 卡片与 llms.txt 等 SEO 与 AI 可读性配置的场景
  • 需要在内置多套配色与浅色/深色模式之间切换、快速调整视觉风格的个人站点

适合人群

  • 熟悉或愿意使用 Astro 与 Node.js 工具链的前端开发者
  • 希望以 JSON 数据文件而非页面代码来维护作品集内容的用户
  • 需要静态生成、可部署到 Netlify 等平台的作品集站点作者
  • 接受 MIT 许可条款、并能自行核对第三方素材许可的开发者

上手与定制指南

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

  1. 1

    README 要求 Node.js v22.12.0 或更高版本,并提到 Astro v6;具体版本请以仓库依赖清单为准

  2. 2

    在 GitHub 上点击 Use this template 创建新仓库后克隆,执行 npm install 安装依赖,npm run dev 启动本地开发服务器(默认 localhost:4321)

  3. 3

    在 src/data/ 下编辑 JSON 文件更新内容,在 src/config.ts 中修改 baseTheme 切换配色

  4. 4

    部署前需在 src/data/home.json 中填写 siteUrl 等字段,以保证 canonical、sitemap 与 OG 图片绝对链接正确

  5. 5

    README 提到的 FastAPI 后端在当前开源版本中不包含,没有后端也可运行;演示图片、字体、图标等第三方素材需按各自许可核对

查看仓库使用说明

授权与来源资料

使用条件与限制

免费使用 · 保留许可声明

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

使用时需要遵守

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

额外费用与待核对事项

  • README 提到后端为 FastAPI,但明确说明没有后端也能运行,且开源版本即将发布,因此当前开源版本不包含后端功能,仅提供前端静态模板。
  • 使用该模板需要本机安装 Astro v6 与 Node.js v22.12.0 或更高版本,属于工具链环境要求。
  • README 建议通过 npm 安装 Inter 字体包,字体等第三方素材需按各自许可单独核对。
  • README 建议通过 npm 安装 Space Grotesk 字体包,字体等第三方素材需按各自许可单独核对。
  • 图标通过 Iconify 的 Material Design Icons 集合引入,图标素材需按各自许可单独核对。
  • README 以 Netlify 作为部署示例,域名与托管等外部服务可能产生额外费用。
  • 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
  • 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据

Permission is hereby granted, free of charge

许可证原文

**Backend:** [FastAPI](https://fastapi.tiangolo.com/) *(Works without backend — open source release coming soon)*

README 原文

Make sure you have **Astro v6** and **Node.js** (v22.12.0 or higher) installed on your machine.

README 原文

Inter font: `npm install @fontsource-variable/inter`

README 原文

Space Grotesk font: `npm install @fontsource-variable/space-grotesk`

README 原文

Material Desing Icons: `npm install @iconify-json/mdi`

README 原文

**Deployment:** [Netlify](https://www.netlify.com)

README 原文
https://github.com/nbakh16/career-portfolio-template/blob/master/LICENSEhttps://github.com/nbakh16/career-portfolio-template/blob/master/README.md

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

项目核对记录与介绍依据

模板资料

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

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

这个项目需要核对什么

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

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

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

查看具体选型方法 →

介绍的制作与核对状态

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

审核声明: [email protected] · 2026-10-04

查看当时使用的来源资料

SHA-256: 4463b8c59d8c55a8735e8f5c14809e9235499e96006937497f90c4fda6a637eb

2026-10-03T15:39:29.138Z

来源文件 / 仓库
# CareerPortfolio: Data-Driven Astro SSG
Live Demo: [careerportofio.netlify.app](https://careerportofio.netlify.app)

[![Astro](https://img.shields.io/badge/Astro-FF5D01?logo=astro&logoColor=white)](https://astro.build/)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
[![Contributions Welcome](https://img.shields.io/badge/🤝_Contributions-Welcome-blue)](CONTRIBUTING.md)

A high-performance, responsive portfolio built with **Astro**, **Tailwind CSS**, and **Native Browser Animations**. Designed to be 100% data-driven and easy to customize as a reusable template.

## 🌟 Highlights
- **Zero-JS by Default:** Leveraging Astro's islands architecture.
- **JSON-First:** Update your information in `src/data/` without touching any code.
- **SEO & AI Ready:** Auto-generated `sitemap.xml`, `robots.txt`, and `/llms.txt` endpoint for AI/LLM crawlers, full Open Graph/Twitter Card support and JSON-LD structured data.
- **Built-in Themes**: Switch between multiple professional color palettes and light/dark modes from a single config file.
- **Fully Responsive:** Optimized for mobile, tablet, and desktop.
- **Performance:** Optimized for perfect Lighthouse scores.

## 🛠️ Tech Stack
- **Frontend:** [Astro](https://astro.build/) (Static Site Generation)
- **Styling:** [Tailwind CSS](https://tailwindcss.com/)
- **Icons:** [Iconify](https://iconify.design/) via `astro-icon`
- **Deployment:** [Netlify](https://www.netlify.com)
- **Backend:** [FastAPI](https://fastapi.tiangolo.com/) *(Works without backend — open source release coming soon)*

## 🚀 Getting Started
Follow these instructions to get a local copy up and running.

### Prerequisites
Make sure you have **Astro v6** and **Node.js** (v22.12.0 or higher) installed on your machine.

### Installation
1. Click **Use this template** on this repository.
2. Choose **Create a new repository**.
3. Clone your new repository: `git clone <your-repo-url>`
4. Navigate to your repo: `cd <your-repo-name>`
5. Install dependencies: `npm install`
6. Start development server: `npm run dev`
7. Update your content in `/src/data/`
8. Build and deploy on your preferred platform


## 🛠️ How to Customize
To make this portfolio yours, simply edit the JSON files in `src/data/`.

### 🎨 Switching Themes
This template comes with multiple built-in color palettes. To change the theme of your portfolio, open `src/config.ts` and update the `baseTheme` variable to one of the available options:

```typescript
export const SITE_CONFIG = {
  // Options: 'default', 'strategic', 'innovator', 'executive'
  baseTheme: 'default', 
};
```
*(The template will automatically handle the dark/light mode toggles for whichever base theme you choose!)*

### 📁 Directory Structure
```
├── public/              # Global static assets (placeholder.jpg, favicon)
├── src/
│   ├── assets/          # Project & Profile images (Supports automatic Astro optimization)
│   ├── components/      # Reusable Astro components
│   ├── data/            # JSON files for project data
│   ├── layouts/         # Layout templates with Meta tags
│   ├── pages/           # Site routes (index.astro)
│   └── styles/          # Global CSS styles
│   └── config.ts        # Global site configuration
├── astro.config.mjs     # Astro configuration
└── tsconfig.json        # TypeScript configuration
```

### 🔍 SEO & AI Optimization
All SEO and AI metadata is driven from `src/data/home.json`. Update the fields below to improve search engine, social media and AI crawler visibility:

| Field | Description |
| :------------ | :----------------------------------------------------------- |
| `siteUrl` | Your deployed domain (e.g. `https://yourname.dev`). Required for canonical URLs, sitemap and absolute OG image links. |
| `webpageTitle` | Page tab title and Open Graph title tag. |
| `description` | Primary intro summary used for meta description, Open Graph, Twitter preview cards and `/llms.txt`. |
| `lang` | Page language code (e.g. `en`, `fr`, `de`). Sets the `<html lang>` attribute. |
| `jobTitle` | Your role — included in JSON-LD structured data shown to search engines and `/llms.txt`. |
| `keywords` | Comma-separated keywords for the `<meta name="keywords">` tag. |
| `twitterHandle` | Your Twitter/X username (with or without `@`). Enables Twitter Card attribution. |
| `ogImageUrl` | Path to your Open Graph preview image. Use a **1200×630 px** image for best results across all platforms. |

> **Automatic Features:**
> - `sitemap-index.xml` & `robots.txt`: Auto-generated at build time.
> - `/llms.txt`: Dynamically generated Markdown portfolio route for AI agents and LLM web crawlers (powered by [`src/pages/llms.txt.ts`](file:///Users/nabil/_projects/astro-trial/career-portfolio-template/src/pages/llms.txt.ts)).



### 📚 Useful commands and links for reference:

| Command                   | Action                                           |
| :------------------------ | :----------------------------------------------- |
| `npm install`             | Installs dependencies                            |
| `npm run dev`             | Starts local dev server at `localhost:4321`      |
| `npm run build`           | Build your production site to `./dist/`          |
| `npm run preview`         | Preview your build locally, before deploying     |
| `npm run astro ...`       | Run CLI commands like `astro add`, `astro check` |
| `npm run astro -- --help` | Get help using the Astro CLI                     |

Tailwind CSS: `npx astro add tailwind`

Inter font: `npm install @fontsource-variable/inter` 

Space Grotesk font: `npm install @fontsource-variable/space-grotesk`

Astro-icon: `npx astro add astro-icon`

Material Desing Icons: `npm install @iconify-json/mdi`

https://docs.astro.build/en/guides/styling/#add-tailwind-4

https://www.astroicon.dev

https://icon-sets.iconify.design/mdi/?category=Material

## 🤝 Contributing
Contributions are welcome!  
Please read the [Contributing Guide](CONTRIBUTING.md) before opening a PR.

## 📝 License
This project is licensed under the [MIT License](LICENSE)
反馈内容错误

看看同类模板

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