CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
Jekyll static site for 暖字表達寫作班 (Nuanzi Writing Class), deployed to GitHub Pages at https://shinruw.github.io/nu-nz-/.
Development Commands
# Set PATH first (required every session)
export PATH="/usr/local/opt/ruby/bin:/usr/local/lib/ruby/gems/4.0.0/bin:$PATH"
# First-time setup
gem install bundler -v 4.0.7
bundle install
# Local preview with live reload
bundle exec jekyll serve --livereload
# → http://127.0.0.1:4000/nu-nz-/
Architecture
Collections:
_students/— Student profiles (one file per student). Usesuidandname_displayfields (notid/name, which are Jekyll reserved words). Each generates a page at/students/UID/._posts/blog/— Teacher’s journal entries. Layout:post, category:blog._posts/works/— Student works. Layout:post, category:works, linked to students viastudent_idmatching a student’suid.
Pages: pages/ contains static pages (about.md, blog.html, contact.md, courses.md, works.html).
Layouts: _layouts/default.html is the base layout. student.html and post.html extend it.
Includes: nav.html, footer.html, line-float.html (floating LINE contact button).
Assets: CSS in assets/css/main.css, images in assets/images/.
Content Conventions
Blog posts (_posts/blog/YYYY-MM-DD-title.md):
- Must include
permalink: /blog/YYYY/MM/DD/english-slug/(avoids Chinese URL encoding issues) - Tags optional
Student works (_posts/works/YYYY-MM-DD-name-title.md):
- Must include
student_idmatching a_students/*.mdfile’suid gradevalues: 低年級、中年級、高年級
Works page (pages/works.html) groups posts by title — works with the same title appear together as a class assignment group.
Student portfolio page (_layouts/student.html) filters site.posts where category == "works" and student_id == page.uid.
Deployment
Push to main branch → GitHub Pages auto-deploys. The baseurl is /nu-nz-.
LINE Contact
Update LINE ID in _includes/line-float.html and pages/contact.md.