Skip to content

Latest commit

 

History

History
39 lines (33 loc) · 2.13 KB

File metadata and controls

39 lines (33 loc) · 2.13 KB

Repository Guidelines

Project Structure & Module Organization

  • config.toml: Site configuration (Zola + serene theme).
  • content/: Markdown pages and posts. Blog posts live under content/posts/.
  • templates/: Tera templates and macros that customize rendering.
  • static/: Static assets copied as‑is (e.g., static/img/).
  • sass/: SCSS sources compiled when compile_sass = true.
  • themes/serene/: Theme as a Git submodule.
  • public/: Build output (generated by Zola). Do not edit.

Build, Test, and Development Commands

  • Init theme submodule: git submodule update --init --recursive.
  • Run locally with live reload: zola serve -i 127.0.0.1 -p 1111.
  • Validate site/config/links: zola check.
  • Build production output to public/: zola build.

Coding Style & Naming Conventions

  • Markdown: concise headings, one sentence per line preferred; wrap ~100 chars.
  • Posts: content/posts/YYYY-MM-DD-slug/index.md (English) and index.zh.md (Chinese).
  • Front matter (TOML): include title, description, date, slug, optional [taxonomies] and [extra] with lang = "en"|"zh".
  • Slugs and paths: kebab-case (e.g., rag-is-the-way).
  • Templates/SASS/TOML: 2‑space indent; avoid trailing whitespace.

Testing Guidelines

  • Run zola check before opening a PR; fix warnings and broken links.
  • Ensure zola build completes cleanly and the site renders as expected locally.
  • No unit tests in this repo; screenshots are helpful for template/style changes.

Commit & Pull Request Guidelines

  • Follow Conventional Commits: feat:, fix:, docs:, chore:, refactor:; optional scope feat(blog):.
  • Keep commits focused and descriptive (imperative mood).
  • PRs should include: purpose, notable changes, screenshots (UI), and zola check/build status.
  • Reference related issues/PRs (e.g., (#50)), and mention if content is bilingual.

Security & Configuration Tips

  • Never commit secrets; keep base_url accurate in config.toml.
  • When updating theme, re-run git submodule update --remote --merge and verify locally.
  • Do not edit files in public/; changes belong in content/, templates/, sass/, or static/.