This file gives Claude Code project-specific guidance for working in this repository.
This is Alice's personal Hugo static blog. It was migrated from the original Jekyll / jekyll-theme-H2O site while preserving Chinese copy, personal pages, animated visual effects, tags, search, night mode, social links, and Netlify/GitHub Pages deployment config.
Primary content language is Chinese. Preserve the author's warm, personal, direct tone when editing posts or profile copy.
- Static site generator: Hugo 0.92.1 extended
- Markdown renderer: Goldmark
- Frontend assets: Hugo templates, static assets, vanilla JavaScript, legacy jQuery-style scripts
- Compatibility script:
scripts/hugo-page-compat.jscopies/page/N/output to old/pageN/paths - Deployment:
- Netlify via
netlify.toml - GitHub Pages via
.github/workflows/hugo.yml
- Netlify via
content/posts/— Hugo blog posts. File format:YYYY-MM-DD-title.md.content/aboutme.md,content/tags.md,content/_index.md— top-level Hugo content pages.layouts/— Hugo templates and partials.static/— static files copied directly topublic/.scripts/hugo-page-compat.js— compatibility step for legacy pagination URLs.public/— Hugo generated output. Do not edit by hand.
Use Hugo for site generation:
hugo server
hugo --gc --minify && node scripts/hugo-page-compat.jsThe configured Netlify production build is:
hugo --gc --minify && node scripts/hugo-page-compat.jsThe GitHub Pages workflow installs Hugo 0.92.1 extended and Node 20, then builds with:
hugo --gc --minify --baseURL "${{ steps.pages.outputs.base_url }}/" && node scripts/hugo-page-compat.jsLegacy Jekyll/Gulp files have been removed from this branch. Keep new work in the Hugo structure.
New posts should live in content/posts/ and include front matter like:
---
title: '文章标题'
subtitle: '可选副标题'
date: YYYY-MM-DD
categories: ['技术']
tags: ['标签1', '标签2']
---Guidelines:
- Keep Chinese punctuation and phrasing natural.
- Preserve existing mixed Chinese/English technical style when editing old posts.
- Prefer practical, example-driven explanations for technical posts.
- Do not rewrite personal voice into generic marketing copy.
- Security-related posts may be educational, CTF, lab, or defensive context; do not add instructions for real-world abuse, persistence, evasion, credential theft, or unauthorized exploitation.
- Prefer semantic HTML in
layouts/templates and partials. - Keep template expressions compatible with Hugo 0.92.1.
- Static CSS/JS currently lives under
static/assets/for Hugo output. - Avoid hand-editing generated output in
public/. - Do not edit
public/; rebuild instead.
Before reporting changes complete:
- Run
hugo --gc --minify && node scripts/hugo-page-compat.js. - If frontend behavior or layout changed, run
hugo serverand inspect the affected page in a browser. - For visual changes, check desktop and mobile widths at minimum.
- Confirm no changes were made only inside
public/. - Check
git status --shortso generated or unrelated files are not accidentally included.
- Netlify publishes
public/and setsHUGO_VERSION=0.92.1,HUGO_ENV=production, andNODE_VERSION=20. - GitHub Pages deploys from pushes to
mastervia.github/workflows/hugo.yml. static/CNAMEandconfig.yamldefine the production domain behavior; do not change these casually.
- The repository currently uses
masteras the main branch. - Do not commit unless the user explicitly asks.
- Do not use destructive git commands without explicit user confirmation.
- Keep generated dependency or build artifacts out of commits unless they are intentionally part of the deployment workflow.