From 710bd4e9b14924b0597532243911c3f26ed742ef Mon Sep 17 00:00:00 2001 From: Toshimaru Date: Tue, 11 Aug 2026 17:19:15 +0900 Subject: [PATCH 1/2] docs: add repository contributor guidelines Co-authored-by: Codex --- AGENTS.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 AGENTS.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000000..9a9d9e80ce --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,28 @@ +# Repository Guidelines + +## Project Structure & Module Organization + +This repository builds the RailsDoc Jekyll site. Hand-maintained site code lives in `src/_layouts`, `src/_sass`, and `src/assets`; site metadata and supported Rails versions are defined in `_config.yml`. The large `src/classes`, `src/files`, and versioned directories such as `src/8.0` are generated Rails API documentation. Avoid editing those files by hand. `rails/` is the Rails Git submodule used as the RDoc source, while `_site/` is ignored Jekyll output. Build orchestration lives in `Rakefile`, and CI/deployment workflows live in `.github/workflows`. + +## Build, Test, and Development Commands + +- `git submodule update --init`: initialize the Rails source after cloning. +- `bundle install`: install Jekyll and Rake dependencies. +- `bundle exec jekyll server`: serve `src/` locally with rebuilds. +- `bundle exec jekyll build`: perform the fast site build used by deployment and basic CI checks. +- `rake build`: regenerate documentation for `_config.yml`'s `default_rails_version`, then build the site. +- `rake 'build_multi[7.1,7.2]'`: regenerate selected historical versions. Quote this command in shells that interpret brackets. + +Documentation tasks fetch tags, switch branches, and run `git reset --hard` inside `rails/`. Do not keep uncommitted work in the submodule. + +## Coding Style & Naming Conventions + +Use two-space indentation for Ruby, JavaScript, YAML, HTML/Liquid, and new SCSS. Ruby files use single quotes where practical and begin with `# frozen_string_literal: true`. Follow the existing JavaScript style: `const`/`let`, double-quoted strings, semicolons, and descriptive camelCase function names. Use kebab-case for asset filenames and CSS classes. Keep version values quoted in `_config.yml`, and make generated-document changes through `Rakefile` tasks. + +## Testing Guidelines + +There is no separate unit-test framework or coverage threshold. Treat `bundle exec jekyll build` as the minimum validation and run `git diff --check` before submitting. For UI changes, use the local server to verify navigation expansion, search keyboard behavior, anchor links, and relevant responsive layouts. Changes to generation logic should also run `rake build` or the smallest applicable `build_multi` target. + +## Commit & Pull Request Guidelines + +Recent history favors concise, imperative subjects and Conventional Commit prefixes such as `feat:`, `fix:`, `docs:`, `style:`, `ci:`, and `build(deps):`. Keep each commit focused. Pull requests should explain the user-visible effect, list validation commands, link related issues, and include screenshots for layout or styling changes. For regenerated documentation, state the Rails version or tag and avoid unrelated generated diffs. From 58b0cf41375a3de1371e2258e26cc9e6eb45f365 Mon Sep 17 00:00:00 2001 From: Toshimaru Date: Tue, 11 Aug 2026 18:01:56 +0900 Subject: [PATCH 2/2] fix: `jekyll s`command Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- AGENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index 9a9d9e80ce..5189b6848a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -8,7 +8,7 @@ This repository builds the RailsDoc Jekyll site. Hand-maintained site code lives - `git submodule update --init`: initialize the Rails source after cloning. - `bundle install`: install Jekyll and Rake dependencies. -- `bundle exec jekyll server`: serve `src/` locally with rebuilds. +- `bundle exec jekyll serve`: serve `src/` locally with rebuilds. - `bundle exec jekyll build`: perform the fast site build used by deployment and basic CI checks. - `rake build`: regenerate documentation for `_config.yml`'s `default_rails_version`, then build the site. - `rake 'build_multi[7.1,7.2]'`: regenerate selected historical versions. Quote this command in shells that interpret brackets.