Repository Guidelines

Repository Guidelines

Project Structure & Module Organization

  • _config.yml: Jekyll site/theme configuration.
  • _includes/, _layouts/, _sass/, assets/: theme templates, styles, and static assets.
  • _data/: YAML data for navigation, authors, etc.
  • _posts/: blog posts (YYYY-MM-DD-title.md).
  • _site/: generated output (do not edit; ignored by git).
  • docs/: demo/docs site configuration used for previews and CI.
  • test/: minimal site used to verify the theme locally.

Build, Test, and Development Commands

  • Install deps: bundle install and npm install (or pnpm i).
  • Local serve: npm run serve (alias of bundle exec jekyll serve -H 127.0.0.1 --trace).
  • Docs/demo serve: npm run demo-dev (uses ./docs/_config.yml).
  • Production build: npm run build (sets JEKYLL_ENV=production and builds to _site/).
  • Lint JS: npm run eslint (fix with npm run eslint-fix).
  • Lint SCSS: npm run stylelint (fix with npm run stylelint-fix).

Coding Style & Naming Conventions

  • Indentation: 2 spaces, LF endings, trim trailing whitespace (.editorconfig).
  • JavaScript: single quotes, semicolons, camelCase, no console in committed code (see .eslintrc).
  • SCSS/CSS: double quotes for strings, ordered properties, no vendor prefixes (.stylelintrc).
  • Posts: YYYY-MM-DD-title.md; images under assets/ with descriptive, kebab-case names.

Testing Guidelines

  • Lint before pushing: npm run eslint && npm run stylelint.
  • Build checks: npm run build should succeed with no warnings; spot-check _site/ output locally.
  • Theme verification: serve either the root or docs//test/ configs to validate pages render as expected.

Commit & Pull Request Guidelines

  • Conventional Commits enforced via commitlint (max 72-char header, lower-case type/scope).
  • Allowed types include: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert, improvement, release.
  • Example: feat(theme): add code block copy button.
  • PRs: include clear description, linked issues, before/after screenshots for UI changes, and steps to reproduce/verify. Update docs where relevant.

Security & Configuration Tips

  • Do not commit secrets; keep tokens and API keys in local env/CI. Review _config.yml changes carefully (e.g., analytics, comments, search providers).
  • _site/ is ephemeral; never edit files there.