CLAUDE.md

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

Jekyll-based personal blog hosted on GitHub Pages, forked from mzlogin/mzlogin.github.io. Content is primarily in Chinese. Deployed automatically on push to master.

Development Commands

bundle install                        # Install Ruby dependencies
bundle exec jekyll serve              # Local dev server at http://localhost:4000
bundle exec jekyll serve --drafts     # Preview including drafts
bundle exec jekyll build              # Build static site to _site/

Architecture

Static site generator: Jekyll via the github-pages gem with Kramdown (GFM) and Rouge syntax highlighting.

Layout hierarchy: compress.htmldefault.html → content layouts (post.html, page.html, wiki.html, fragment.html, categories.html, gallery.html, mindmap.html).

Collections: Posts (_posts/), Wiki (_wiki/), and Fragments (_fragments/) are three content types, each with different front matter schemas and URL patterns.

Data files in _data/: links.yml (blogroll), skills.yml (about page), social.yml (social links).

JS/CSS: jQuery + Primer CSS (GitHub’s framework). Specialized libraries (mermaid, flowchart.js, sequence diagrams, MathJax, kityminder, markmap) are conditionally loaded via front matter flags.

Comments: Beaudar (utterances alternative) configured in _config.yml.

Search: Client-side via simple-jekyll-search using assets/search_data.json (generated by Liquid).

Content Conventions

Post filenames: YYYY-MM-DD-category-slug.md in _posts/.

Permalink structure: /:year/:month/:day/:title/

Front matter flags — set to true to enable per-page:

  • mermaid, sequence, flow — diagram rendering
  • mathjax — LaTeX math
  • mindmap / mindmap2 — kityminder / markmap mind maps
  • topmost — pin to top of listing

Liquid conflicts: Wrap code blocks containing Go templates or syntax with / ``.

Images: Store in images/posts/ and reference as /images/posts/.... The default layout rewrites image src to include the full site URL.

Wiki entries use cate1/cate2 for hierarchical categorization. Fragments use tags instead of categories.

See _posts/template.md, _wiki/template.md, and _fragments/template.md for full front matter examples.