CLAUDE.md
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
This is a Jekyll-based academic website for Lei Hu (胡磊), a Ph.D. candidate at Westlake University. It’s built using the Minimal Mistakes Jekyll theme and hosted on GitHub Pages.
AI Assistant Core Rules (八荣八耻)
核心行为准则
- ✅ 以暗猜接口为耻,❌ 以认真查阅为荣。
- ✅ 以模糊执行为耻,❌ 以寻求确认为荣。
- ✅ 以盲想业务为耻,❌ 以人类确认为荣。
- ✅ 以创造接口为耻,❌ 以复用现有为荣。
- ✅ 以跳过验证为耻,❌ 以主动测试为荣。
- ✅ 以破坏架构为耻,❌ 以遵循规范为荣。
- ✅ 以假装理解为耻,❌ 以诚实无知为荣。
- ✅ 以盲目修改为耻,❌ 以谨慎重构为荣。
Essential Commands
Local Development
# Install Ruby dependencies
bundle install
# Serve locally with live reload (recommended)
bundle exec jekyll liveserve
# Alternative: serve with development config
bundle exec jekyll serve --config _config.yml,_config.dev.yml
# Clean and reinstall if you encounter dependency issues
bundle clean
bundle install
Content Generation
# Generate publications from TSV file
cd markdown_generator
python publications.py
# Generate talks from TSV file
cd markdown_generator
python talks.py
Architecture & Key Components
Jekyll Structure
_config.yml: Main site configuration including author info, social links, and site settings_config.dev.yml: Development overrides (localhost URL, disabled analytics)_layouts/: HTML templates that define page structure (default, single, archive, talk, etc.)_includes/: Reusable HTML components (header, footer, analytics, etc.)_sass/: SCSS stylesheets for site styling_data/: YAML data files for navigation and other structured data
Content Organization
_pages/: Main content pages (about.md, education.md, research.md, publications.md, teaching.md)_publications/: Individual publication markdown files with specific front matter for academic papers_talks/: Academic talk/presentation entries_teaching/: Teaching experience entries_portfolio/: Portfolio project entriesimages/: Site images and logosfiles/: PDFs and downloadable documents
Critical Front Matter Patterns
Publications require specific front matter:
---
title: "Paper Title"
collection: publications
permalink: /publication/2023-paper-name
date: 2023-01-01
venue: 'Journal Name'
paperurl: 'https://doi.org/...'
citation: 'Your Name et al. "Paper Title." Journal Name (2023).'
---
Talks use:
---
title: "Talk Title"
collection: talks
type: "Talk"
permalink: /talks/2023-talk-name
date: 2023-01-01
venue: "Conference Name"
---
Theme Customization Points
_sass/_variables.scss: Color scheme and typography variables_includes/head/custom.html: Custom HTML head content_includes/footer/custom.html: Custom footer contentassets/css/main.scss: Main stylesheet entry point
Development Workflow
- Content Updates: Edit markdown files in
_pages/,_publications/,_talks/, etc. - Styling Changes: Modify SCSS files in
_sass/directory - Layout Changes: Edit HTML templates in
_layouts/or components in_includes/ - Configuration: Update
_config.ymlfor site-wide settings - Local Testing: Always test changes locally with
bundle exec jekyll liveservebefore committing
Key Dependencies
- Jekyll: Static site generator
- github-pages: GitHub Pages compatible Jekyll build
- Minimal Mistakes Theme: Academic-focused Jekyll theme
- hawkins: Live reload functionality for development
Deployment
The site automatically deploys to GitHub Pages when changes are pushed to the repository. No manual build step required - GitHub handles Jekyll compilation.
