|
| 1 | +# AGENTS.md |
| 2 | + |
| 3 | +## Project overview |
| 4 | + |
| 5 | +- Purpose: official Selenium website and documentation, built with Hugo and Docsy. |
| 6 | +- Primary content: Markdown, HTML, Hugo templates, site assets, structured data, and runnable |
| 7 | + examples in Java, Python, .NET, Ruby, JavaScript, and Kotlin. |
| 8 | +- Setup and installation details live in `README.md`. Use its Quick start section for the current |
| 9 | + Hugo Extended version, Docsy requirements, and local setup guidance. |
| 10 | + |
| 11 | +## Local contributor customization |
| 12 | + |
| 13 | +- The `.local/` directory is available for customization, generated artifacts, scratch work, |
| 14 | + and temporary files. It is ignored by Git except for `.local/README.md`. |
| 15 | +- A contributor may create `.local/AGENTS.md` for personal repo-specific instructions and |
| 16 | + preferences. Before beginning any task, check whether `.local/AGENTS.md` exists; if it |
| 17 | + exists, read it with your file-reading tool and apply it as the contributor's local |
| 18 | + instruction overlay. |
| 19 | +- If `.local/agent/skills/` exists, inspect its `*/SKILL.md` files and treat them as |
| 20 | + additional user-defined skills. |
| 21 | + |
| 22 | +## Repository map |
| 23 | + |
| 24 | +- `website_and_docs/`: Hugo site root. Run local Hugo commands from here. |
| 25 | +- `website_and_docs/content/`: Published site content, including docs, blog posts, project pages, |
| 26 | + and translations. |
| 27 | +- `website_and_docs/content/documentation/`: Main Selenium documentation. Read |
| 28 | + `about/style.en.md` for documentation style conventions before editing docs. |
| 29 | +- `website_and_docs/layouts/`: Hugo templates and shortcodes. |
| 30 | +- `website_and_docs/assets/`, `website_and_docs/static/`, `website_and_docs/data/`: Site assets, |
| 31 | + static files, and structured data. |
| 32 | +- `examples/`: Runnable examples referenced from docs through `gh-codeblock`. |
| 33 | +- `scripts/`, `build-site.sh`, `netlify.toml`: Build, preview, release, and deploy support. |
| 34 | +- `website_and_docs/public/`, `website_and_docs/resources/`: Generated Hugo output/cache; avoid |
| 35 | + manual edits. |
| 36 | + |
| 37 | +## Standard commands |
| 38 | + |
| 39 | +- Preview site locally: `cd website_and_docs && hugo server` |
| 40 | +- Preview without Hugo cache: `cd website_and_docs && hugo server --ignoreCache` |
| 41 | +- Build site like CI: `./build-site.sh` |
| 42 | +- Java examples: `cd examples/java && mvn test` |
| 43 | +- Python examples: `cd examples/python && pytest` |
| 44 | +- JavaScript examples: `cd examples/javascript && npm test` |
| 45 | +- Ruby examples: `cd examples/ruby && bundle exec rspec` |
| 46 | +- Ruby example lint: `cd examples/ruby && bundle exec rubocop` |
| 47 | +- .NET examples: `cd examples/dotnet/SeleniumDocs && dotnet test` |
| 48 | +- Kotlin examples: `cd examples/kotlin && mvn test` |
| 49 | + |
| 50 | +## Working guidance |
| 51 | + |
| 52 | +- Prefer small, focused changes that match the existing structure and naming. |
| 53 | +- Follow `website_and_docs/content/documentation/about/style.en.md` for docs style. In particular, |
| 54 | + keep prose language-independent, put binding-specific code in tabs, use `gh-codeblock` for |
| 55 | + runnable snippets, and do not indent `gh-codeblock` lines. |
| 56 | +- Changes under `examples/` probably require matching markdown updates. Search |
| 57 | + `website_and_docs/content` for affected `gh-codeblock` paths and update line ranges after moving, |
| 58 | + adding, or removing lines. |
| 59 | +- For docs/layout changes, run `./build-site.sh` when practical. For example changes, run the |
| 60 | + relevant binding's example tests and check affected `gh-codeblock` references. |
| 61 | +- For PR review tasks, read `.github/pr_review.md` before reviewing. |
| 62 | +- GitHub Actions builds the site on PRs touching `website_and_docs/**`. Deploys occur from `trunk` |
| 63 | + when a commit message contains `[deploy site]`; output is pushed to `publish`. |
| 64 | +- Never commit secrets, tokens, cookies, private keys, or local credentials. Tracked project files |
| 65 | + must not depend on `.local/`. |
0 commit comments