This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a Hugo static site blog (eallion.com) that uses a custom theme called "pehtheme" and integrates with multiple external services including Directus CMS, Mastodon, NeoDB, and various APIs. The site is deployed to both Cloudflare Pages and Alibaba Cloud OSS.
- Hugo: Static site generator (v0.116.0+)
- TailwindCSS v4: CSS framework with custom build process
- Directus: Headless CMS for content management
- Node.js: Build scripts and API integrations
- pnpm: Package manager
# Start development server with live reload
pnpm run dev
# Build for production
pnpm run build
# Clean all generated files
pnpm run clean# Fetch all content from Directus CMS
pnpm run directus
# Fetch specific data types
pnpm run directus:article # Blog articles
pnpm run directus:mastodon # Mastodon posts
pnpm run directus:neodb # NeoDB book/movie data
pnpm run directus:friendslinks # Friends links
pnpm run directus:album # Photo albums# Initialize git submodules for theme
pnpm run theme:init
# Update theme to latest version
pnpm run theme:update# Create new blog post
pnpm run new
# Generate LLMs.txt file
pnpm run llms- Primary CMS: Directus manages all blog content, articles are fetched via API
- Static Generation: Hugo builds static site from fetched content
- CSS Pipeline: TailwindCSS v4 compiles from
assets/css/input.csstoassets/css/main.css - Deployment: GitHub Actions deploy to multiple platforms
content/: Hugo content files (blog posts in markdown)assets/css/: TailwindCSS source and compiled stylesassets/data/: JSON data fetched from APIs (generated during build)scripts/: Node.js build scripts and API integrationslayouts/: Hugo template overridesstatic/: Static assets served as-is
- Directus CMS: Primary content management via REST API
- Mastodon (e5n.cc): Social media posts for "嘀咕" page
- NeoDB: Book and movie tracking data
- Cloudflare Pages: Primary hosting
- Alibaba Cloud OSS: Secondary hosting for China
- Copy
.env.exampleto.env.local - Configure required API tokens and endpoints:
DIRECTUS_API_URL: Directus CMS endpointDIRECTUS_ACCESS_TOKEN: API authentication tokenNEODB_ACCESS_TOKEN: NeoDB API access- Additional tokens for various integrations
- CSS Compilation: TailwindCSS v4 processes
assets/css/input.css - Content Fetching: Scripts pull data from Directus and other APIs
- Hugo Build: Static site generation with minification
- Deployment: Automated via GitHub Actions
hugo.toml: Main Hugo configuration with site settings, menus, and build optionspackage.json: Scripts and dependencies for the build processscripts/directus-fetch-*.js: API integration scripts for different data sourcesassets/css/input.css: TailwindCSS entry point with custom configurations
The project uses a git submodule for the "pehtheme" Hugo theme. Customizations should be made in:
layouts/: Template overridesassets/css/custom.css: Custom stylesstatic/: Custom static assets
- Content is primarily managed through Directus CMS, not local markdown files
- The build process automatically fetches fresh data from all APIs
- TailwindCSS v4 has a different build process than previous versions
- Site supports Chinese content with CJK language configuration