Hugo作品集博客

aafu — Hugo 作品集模板

作者 darshanbaral

aafu 是一个基于 Hugo 的作品集与博客主题,使用 Tailwind CSS 构建,支持手风琴式分区布局、明暗主题切换和 Pagefind 站内搜索。

看看你的网站会是什么样

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

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

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

全部页面与视图 3

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

采集于 2026-09-30查看来源

值得关注的模板亮点

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

01

同时面向作品集与博客两种内容形态

02

手风琴式分区布局,可配置显示分区、顺序与默认展开项

03

支持浅色、深色与跟随设备的自动主题模式

04

使用 Tailwind CSS 构建样式

05

通过 Pagefind 提供站内搜索

06

仓库可直接作为完整 Hugo 站点运行,也可作为主题集成

模板详细介绍

aafu 是一个用 Hugo 构建的作品集与博客主题,仓库本身即可作为一个完整的 Hugo 站点直接运行,也可以作为主题集成到已有的 Hugo 项目中。主题的页面结构以手风琴式分区组织内容,可以在 config.yaml 中定义显示哪些分区、调整分区顺序,并指定默认展开的分区。

外观方面,主题提供浅色、深色和跟随设备设置的自动三种模式,通过 config.yaml 中的 params.theme.mainTheme 切换;个人头像通过替换 static/images 下的 profile.jpg 更换。主题包含博客部分,并借助 Pagefind 提供站内搜索,部署前需要先构建站点再对 public 目录建立索引。

使用限制方面,作为主题集成时需要从仓库复制 config.yaml、package.json、tailwind.config.js 以及 assets/、static/ 目录到项目根目录,并在 config.yaml 中设置 theme: aafu。搜索功能依赖 Pagefind 的额外索引步骤,不是开箱即用。演示站点中的图片、字体、图标等第三方素材需按各自许可单独核对。

Hugo作品集博客

适合你的项目吗?

适用场景

  • 搭建个人作品集网站并附带博客栏目
  • 在已有 Hugo 项目中引入作品集主题
  • 需要一个支持明暗主题切换的静态个人站点
  • 为站点添加基于 Pagefind 的本地搜索

适合人群

  • 使用 Hugo 构建站点的开发者
  • 需要作品集与博客合一页面的个人
  • 希望在 Hugo 中配置分区顺序与默认展开状态的用户
  • 接受在部署前额外运行 Pagefind 索引步骤的站点维护者

上手与定制指南

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

  1. 1

    直接运行仓库:克隆后执行 npm install,再用 hugo server 启动开发服务器

  2. 2

    作为主题使用:以 git submodule 方式加入 themes/aafu,并复制 config.yaml、package.json、tailwind.config.js 及 assets/、static/ 到项目根目录

  3. 3

    在 config.yaml 中设置 theme: aafu 以启用主题

  4. 4

    替换 static/images 下的 profile.jpg 以更换头像

  5. 5

    部署前先执行 hugo -b https://your_base_url/ 构建,再运行 npx -y pagefind --site public 建立搜索索引

查看仓库使用说明

授权与来源资料

使用条件与限制

免费使用 · 保留许可声明

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

使用时需要遵守

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

额外费用与待核对事项

  • 站内搜索依赖第三方工具 Pagefind,部署前必须额外执行索引步骤(hugo 构建后运行 npx -y pagefind --site public),并非开箱即用。
  • 作为主题集成到已有 Hugo 项目时,需手动从仓库复制 config.yaml、package.json、tailwind.config.js 以及 assets/、static/ 目录到项目根目录,并设置 theme: aafu。
  • 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
  • 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据

Permission is hereby granted, free of charge

许可证原文

This theme supports search functionality using [Pagefind](https://pagefind.app/). Before deploying, index your content using the following command:

README 原文

Copy the following files/folders from `aafu/` to your project root:

README 原文
https://github.com/darshanbaral/aafu/blob/main/LICENSEhttps://github.com/darshanbaral/aafu/blob/main/README.md

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

项目核对记录与介绍依据

模板资料

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

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

这个项目需要核对什么

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

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

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

查看具体选型方法 →

介绍的制作与核对状态

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

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

查看当时使用的来源资料

SHA-256: a9a98edff7bba1f387c58c4583967f2b6aafdf6561347ed32fa019bd6178d133

2026-10-02T15:37:02.437Z

来源文件 / 仓库
# aafu Theme

**aafu** is a modern, responsive portfolio and blog theme built with [Hugo](https://gohugo.io/) and powered by [Tailwind CSS 4.x](https://tailwindcss.com/).

## 🌍 Live Demo

Experience the theme in action: https://aafu.darshanbaral.com

## 🚀 Installation

### 🧪 Local Development

#### Option 1: Standalone Project

The repository functions as a complete Hugo site out of the box. To run it locally:

```sh
# Clone the repository
git clone https://github.com/darshanbaral/aafu.git
cd aafu

# Install dependencies
npm install

# Start the development server
hugo server
```

#### Option 2: Use as a Hugo Theme

To use `aafu` as a theme within your own Hugo project:

1. Add the theme:

   ```bash
   git submodule add https://github.com/darshanbaral/aafu.git themes/aafu
   ```

2. Copy the following files/folders from `aafu/` to your project root:

   - Files:
     - `config.yaml`
     - `package.json`
     - `tailwind.config.js`
   - Folders:
     - `assets/`
     - `static/`

    The project structure should look something like:

    ```
    your-hugo-project/
    ├── config.yaml
    ├── package.json
    ├── tailwind.config.js    
    ├── assets/
    ├── content/
    ├── static/
    ├── themes/
    │   └── aafu/
    ```

3. Enable the theme by setting the theme in `config.yaml`:

   ```yaml
   theme: aafu
   ```

4. Install dependencies and start development server:

   ```bash
   npm install
   hugo server
   ```

### 🔧 Getting Started

#### Configuration (`config.yaml`)

Customize the theme by modifying the [`config.yaml`](https://github.com/darshanbaral/aafu/blob/master/config.yaml).

Key customization options:

- Define which sections appear in the accordion.
- Control the order of sections.
- Choose which section should be expanded by default.

#### Profile Image

Replace `profile.jpg` in `static/images` with your own profile picture.

#### Theme Modes

To configure the theme mode, modify the `params.theme.mainTheme` attribute in `config.yaml`.

- **Light Mode** (`light`)
- **Dark Mode** (`dark`)
- **Auto Mode** (`null` - adjusts based on user’s device settings)

### 📦 Deployment

This theme supports search functionality using [Pagefind](https://pagefind.app/). Before deploying, index your content using the following command:

```sh
hugo -b https://your_base_url/; npx -y pagefind --site public
```

## 🐞 Reporting Issues & Feature Requests

If you encounter any bugs or have feature suggestions, please [open an issue](https://github.com/darshanbaral/aafu/issues/new).

---

Enjoy using **aafu**! 🚀
反馈内容错误

看看同类模板

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