diff --git a/.github/workflows/docs-preview.yml b/.github/workflows/docs-preview.yml deleted file mode 100644 index 5f90f0a34..000000000 --- a/.github/workflows/docs-preview.yml +++ /dev/null @@ -1,89 +0,0 @@ -name: Docs Preview - -on: - pull_request: - paths: - - "docs/**" - types: [opened, synchronize, reopened, closed] - -concurrency: - group: docs-preview-${{ github.event.pull_request.number }} - cancel-in-progress: true - -jobs: - build-and-deploy: - if: >- - github.event.pull_request.head.repo.full_name == github.repository - && github.event.action != 'closed' - runs-on: ubuntu-latest - permissions: - contents: write - environment: - name: github-pages - url: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/pr-${{ github.event.pull_request.number }}/ - steps: - - name: Checkout - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - - name: Set up Ruby - uses: ruby/setup-ruby@e5517072e87f198d9533967ae13d97c11b604005 # v1.99.0 - with: - ruby-version: "3.3" - working-directory: docs - - - name: Install dependencies - run: bundle install - working-directory: docs - - - name: Build Jekyll site - run: bundle exec jekyll build --baseurl "/${{ github.event.repository.name }}/pr-${{ github.event.pull_request.number }}" - working-directory: docs - env: - JEKYLL_ENV: production - - - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: docs/_site - destination_dir: pr-${{ github.event.pull_request.number }} - - comment: - needs: build-and-deploy - if: >- - github.event.pull_request.head.repo.full_name == github.repository - && github.event.action != 'closed' - runs-on: ubuntu-latest - permissions: - pull-requests: write - steps: - - name: Comment preview URL - uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2.9.4 - with: - header: docs-preview - message: | - π **Docs preview**: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/pr-${{ github.event.pull_request.number }}/ - - cleanup: - if: >- - github.event.pull_request.head.repo.full_name == github.repository - && github.event.action == 'closed' - runs-on: ubuntu-latest - permissions: - contents: write - steps: - - name: Checkout gh-pages branch - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - ref: gh-pages - - - name: Remove preview directory - run: | - PR_DIR="pr-${{ github.event.pull_request.number }}" - if [ -d "$PR_DIR" ]; then - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - git rm -rf "$PR_DIR" - git commit -m "chore: remove docs preview for PR #${{ github.event.pull_request.number }}" - git push - fi diff --git a/docs/.gitignore b/docs/.gitignore index ee58fa2ca..a17c0ea9c 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -3,6 +3,7 @@ _site/ .jekyll-cache/ .jekyll-metadata vendor/ +.bundle/ Gemfile.lock node_modules/ pages/ diff --git a/docs/STYLE.md b/docs/STYLE.md new file mode 100644 index 000000000..a378e8aae --- /dev/null +++ b/docs/STYLE.md @@ -0,0 +1,72 @@ +# Documentation style guide + +A short reference for writers and reviewers. Goal: keep voice, naming +and examples consistent across every page on this site. + +## Product naming + +| Context | Use | Don't use | +|---|---|---| +| Prose, headings, marketing | **Docker Agent** (two words, both capitalised β the proper name of the product) | docker-agent, Docker-Agent, docker agent (in prose) | +| The CLI command | `docker agent` (lower-case, two words, in monospace) | `docker-agent`, `Docker Agent run` | +| The repository / module path | `docker/docker-agent` | docker/Docker-Agent | +| Internal identifiers / package names | as defined in code (e.g. `cagent`) β never invent new spellings in prose | mixing internal identifiers into user-facing copy | + +A simple rule of thumb: +- **Talking about the product?** β "Docker Agent" +- **Showing a command the user types?** β `docker agent run agent.yaml` + +## Voice + +- Address the reader as **you**, not "we" or "the user". +- Prefer present tense and active voice ("the agent reads files", + not "files will be read by the agent"). +- Keep sentences short. Two short sentences usually beat one compound + one. +- Avoid "simply", "just", "easily" β they're rarely accurate and + often condescending. + +## Code samples + +- All shell prompts use `$ ` (dollar + space) and the command on the + same line. Output, when shown, has no prompt. +- YAML/HCL examples should be runnable as-is when reasonable, or end + in `# ...` to make truncation explicit. +- The canonical example agent uses `model: anthropic/claude-sonnet-4-5`. + Use a different model only when the example is *about* that model. +- File names in prose are in `monospace` (`agent.yaml`, not "agent.yaml"). + +## Callouts + +Use the existing pattern; the new visual style does the rest: + +```markdown +
Body text.
+