This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
这是一个基于 Hux Blog 主题的 Jekyll 个人博客,部署在 GitHub Pages (https://blog.gzdzss.cn)。支持侧边栏布局、标签云、PWA 离线访问等功能。
1
2
3
4
5
6
7
# 启动 Jekyll 服务(带实时刷新和 LiveReload)
npm run start
# 或直接使用:
bundle exec jekyll serve -w -l --host 0.0.0.0
# 完整开发模式(包含 LESS/JS 文件监视)
npm run dev
1
2
3
4
5
6
7
8
# 编译 LESS 和压缩 JS
grunt
# 构建 Jekyll 站点
bundle exec jekyll build
# 仅监视 LESS/JS 变化
grunt watch
1
2
# 推送到 GitHub Pages(项目会自动部署)
git push origin gh-pages
_layouts/ - Jekyll 模板:default.html(基础)、page.html(带 banner 的页面)、post.html(博客文章)、keynote.html(全宽演讲稿)_includes/ - 可复用 HTML 组件:导航栏、页脚、侧边栏、搜索框等_posts/ - 博客文章(Markdown 格式)less/ - LESS 样式源文件(编译到 css/hux-blog.css)js/ - JavaScript 文件(hux-blog.js 是主要逻辑)pwa/ - PWA 相关资源(manifest.json、图标)_site/ - Jekyll 生成的静态站点输出(部署目标)文章存放在 _posts/,使用以下 front matter:
1
2
3
4
5
6
7
---
layout: post
title: "文章标题"
date: YYYY-MM-DD HH:MM:SS +0800
categories: [分类1, 分类2]
tags: [标签1, 标签2]
---
文件命名规范:YYYY-MM-DD-title-slug.md
_config.yml)default.html 是基础模板,所有页面都继承它。page.html 添加了带背景图的 intro-header。post.html 扩展 page.html 用于博客文章。
less/,编译后输出到 css/hux-blog.cssless/variables.lessgrunt less关于页面内容分为 _includes/about/en.md 和 _includes/about/zh.md。文章可通过 lang: en 设置语言,默认为中文(截断长度不同)。
.gitignore 排除了 *.py 文件(Python 测试文件)