Skip to content

Commit 277961b

Browse files
author
NightVoyager
committed
docs: 更新 CLAUDE.md, draft, audio
1 parent 216f93d commit 277961b

5 files changed

Lines changed: 134 additions & 36 deletions

File tree

CLAUDE.md

Lines changed: 44 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,77 @@
11
# CLAUDE.md
22

3-
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
3+
本文件为 Claude Code (claude.ai/code) 在此仓库中工作提供指导。
44

5-
## Project Overview
5+
**重要说明:本项目的所有文档、注释和生成内容都应使用中文。**
66

7-
This is a Hugo-based personal blog (夜航星 / Night Voyager) using the FixIt theme. The site is in Chinese (zh-CN) and covers topics like cognitive psychology, learning methods, data analysis, and programming.
7+
## 项目概述
88

9-
- **Base URL:** https://austinxt.github.io (Custom domain: blog.nightvoyager.top)
10-
- **Theme:** FixIt (installed as git submodule in `themes/FixIt/`)
9+
这是一个基于 Hugo 的个人博客(夜航星 / Night Voyager),使用 FixIt 主题。网站语言为中文(zh-CN),内容涵盖认知心理学、学习方法、数据分析和编程等主题。
1110

12-
## Common Commands
11+
- **基础 URL:** https://austinxt.github.io(自定义域名:blog.nightvoyager.top)
12+
- **主题:** FixIt(作为 git 子模块安装在 `themes/FixIt/` 目录)
13+
- **Hugo 版本:** 0.154.5 extended(在 `.github/workflows/hugo.yml` 中指定)
14+
15+
## 常用命令
1316

1417
```bash
15-
# Development server with live reload
18+
# 开发服务器(支持热重载)
1619
hugo server
1720

18-
# Development with full rebuild on changes (use when editing layouts)
21+
# 开发服务器(编辑布局文件时使用,完整重建)
1922
hugo server --disableFastRender
2023

21-
# Production build (outputs to public/)
24+
# 生产环境构建(输出到 public/ 目录)
2225
hugo
2326

24-
# Create new post
27+
# 创建新文章
2528
hugo new posts/YYYY-MM-DD-title.md
2629

27-
# Create new talk/note
30+
# 创建新笔记/讨论
2831
hugo new talks/YYYY-MM-DD-title.md
2932
```
3033

31-
## Architecture
34+
## 项目架构
3235

33-
### Content Organization
34-
- `content/posts/` - Published articles (~70 posts)
35-
- `content/talks/` - Discussion notes and quick thoughts (~43 entries)
36-
- `content/draft/` - Draft articles (not published)
36+
### 内容组织
37+
- `content/posts/` - 已发布文章(约 70 篇)
38+
- `content/talks/` - 讨论笔记和随想(约 43 篇)
39+
- `content/draft/` - 草稿文章(未发布)
3740

38-
### Configuration
39-
- `config.toml` - Main Hugo configuration including SEO verification codes, menu structure, theme settings, and markup options
41+
### 配置文件
42+
- `config.toml` - Hugo 主配置文件,包含 SEO 验证码、菜单结构、主题设置、Giscus 评论、Fuse 搜索和标记选项
4043

41-
### Custom Layouts
42-
- `layouts/_partials/head/seo.html` - Enhanced SEO metadata template with JSON-LD schema, AI-friendly tags, and search engine verification codes
44+
### 自定义布局
45+
- `layouts/_partials/head/seo.html` - 增强的 SEO 元数据模板,包含 JSON-LD schema、AI 友好标签和搜索引擎验证码
46+
- `layouts/partials/head/custom.html` - 自定义 head 内容
47+
- `layouts/partials/audio-player.html` - 音频播放器组件(在 `params.customPartials.postContentBefore` 中配置)
4348

44-
### Static Assets
45-
- `static/robots.txt` - SEO crawler rules including explicit AI crawler permissions (GPTBot, Claude-Web, etc.)
46-
- `static/ai.txt` - AI usage policy declaration (CC-BY-NC-4.0 license)
47-
- `static/CNAME` - GitHub Pages custom domain configuration
49+
### 静态资源
50+
- `static/robots.txt` - SEO 爬虫规则,包含对 AI 爬虫的明确授权(GPTBotClaude-Web 等)
51+
- `static/ai.txt` - AI 使用政策声明(CC-BY-NC-4.0 许可证)
52+
- `static/CNAME` - GitHub Pages 自定义域名配置
4853

49-
### Theme
50-
The FixIt theme is a git submodule. Do not modify files inside `themes/FixIt/` directly. Use `layouts/` directory for customizations that override theme templates.
54+
### 主题
55+
FixIt 主题作为 git 子模块安装。请勿直接修改 `themes/FixIt/` 目录下的文件。如需自定义,请在 `layouts/` 目录中创建覆盖模板。
5156

52-
## Front Matter Template
57+
## Front Matter 模板
5358

54-
Posts use YAML front matter with these key fields:
59+
文章使用 YAML 格式的 front matter,主要字段如下:
5560
```yaml
56-
title: Post title
57-
subtitle: Subtitle
61+
title: 文章标题
62+
subtitle: 副标题
5863
date: YYYY-MM-DD
59-
description: SEO description
60-
tags: [tag1, tag2]
61-
categories: [category]
64+
description: SEO 描述
65+
tags: [标签1, 标签2]
66+
categories: [分类]
6267
featuredImage: /images/image.jpg
6368
lightgallery: true
64-
mathjax: false # Enable per-post for math content
6569
```
6670
67-
## Deployment
71+
## 部署
72+
73+
网站使用 GitHub Actions 自动部署。推送到 `main` 分支会触发:
74+
1. 使用 `--gc --minify` 参数构建 Hugo
75+
2. 上传到 GitHub Pages
6876

69-
The site deploys to GitHub Pages. After running `hugo`, commit the `public/` directory and push to trigger deployment.
77+
详见 `.github/workflows/hugo.yml` 工作流配置。无需手动部署。
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
title: 音频播放器测试文章一
3+
subtitle: 测试 TTS 音频播放功能
4+
date: 2024-01-13
5+
slug: audio-test-1
6+
categories: [测试]
7+
tags: [音频测试]
8+
ttsAudio: /audio/test-audio-1.mp3
9+
---
10+
11+
这是第一篇音频播放器测试文章。
12+
13+
## 测试目的
14+
15+
本文用于测试博客的 TTS 音频播放器功能,包括:
16+
17+
1. 音频播放器的显示
18+
2. 播放/暂停控制
19+
3. 进度条拖动
20+
4. 播放速度调节
21+
5. 自动播放下一篇功能
22+
23+
## 功能说明
24+
25+
音频播放器支持以下功能:
26+
27+
- **播放/暂停**:点击播放按钮控制音频
28+
- **快进/快退**:前进或后退 10 秒
29+
- **进度控制**:拖动进度条跳转到指定位置
30+
- **播放速度**:支持 0.5x 到 2x 速度调节
31+
- **迷你播放器**:滚动页面时显示悬浮播放器
32+
- **连续播放**:支持自动播放下一篇文章的音频
33+
34+
## 测试内容
35+
36+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris.
37+
38+
这是一段测试文字,用于测试音频播放器在文章页面中的显示效果。
39+
40+
## ChangeLog
41+
42+
- 2025-01-13 创建测试文章
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
title: 音频播放器测试文章二
3+
subtitle: 测试连续播放功能
4+
date: 2024-01-14
5+
slug: audio-test-2
6+
categories: [测试]
7+
tags: [音频测试]
8+
ttsAudio: /audio/test-audio-2.mp3
9+
---
10+
11+
这是第二篇音频播放器测试文章。
12+
13+
## 连续播放测试
14+
15+
本文与第一篇测试文章配合,用于测试音频播放器的连续播放功能:
16+
17+
1. 从第一篇文章播放完毕后自动跳转
18+
2. 上一篇/下一篇导航按钮
19+
3. 跨文章的播放状态保持
20+
21+
## 迷你播放器测试
22+
23+
当用户向下滚动页面,主播放器离开视口时,应该显示悬浮的迷你播放器:
24+
25+
- 显示当前播放进度
26+
- 提供播放/暂停按钮
27+
- 点击展开按钮回到主播放器位置
28+
29+
## 更多测试内容
30+
31+
这里是更多的测试内容,用于增加页面高度,以便测试迷你播放器的显示效果。
32+
33+
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
34+
35+
Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.
36+
37+
## 技术实现
38+
39+
音频播放器使用以下技术实现:
40+
41+
- HTML5 `<audio>` 元素
42+
- 原生 JavaScript 控制
43+
- CSS 自定义样式
44+
- Font Awesome 图标
45+
46+
## ChangeLog
47+
48+
- 2025-01-13 创建测试文章

static/audio/test-audio-1.mp3

8.53 MB
Binary file not shown.

static/audio/test-audio-2.mp3

9.75 MB
Binary file not shown.

0 commit comments

Comments
 (0)