Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .claude/docs/DOCS_STYLE_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,37 @@ superseded by the canonical content guidelines.

## Code Examples

### Configuration examples: prefer environment variables

When showing how to configure `coder server` in admin or setup
documentation, lead with the environment variable form. Production Coder
deployments are typically run as a system service, container, or Helm
chart, all of which set configuration through environment variables (for
example, Helm `values.yaml` for Kubernetes or `/etc/coder.d/coder.env` for
a system service). Showing the CLI flag form first forces operators to
mentally translate every example.

Show the equivalent CLI flag only when the example is invoking
`coder server` directly (for local development or one-off runs), or as a
supporting note. Point readers at the
[configuration reference](../../docs/admin/setup/configuration-reference.md)
for the full mapping between environment variables, flags, and YAML keys.

````markdown
```sh
# Preferred for admin/setup docs:
CODER_UPDATE_CHECK=false
```
````

Comment thread
nickvigilante marked this conversation as resolved.
CLI flag form, reserved for ad-hoc invocations:

````markdown
```sh
coder server --update-check=false
```
````

### Command Examples

````markdown
Expand Down
3 changes: 3 additions & 0 deletions .github/.linkspector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,8 @@ ignorePatterns:
- pattern: "merriam-webster.com"
# npmjs.com returns 403 from GitHub runner IPs
- pattern: "npmjs.com"
# AWS Bedrock base URL appears as an illustrative <region> placeholder in
# the generated configuration reference, not as a live link.
- pattern: "bedrock-runtime"
aliveStatusCodes:
- 200
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ endif
docs/manifest.json \
docs/admin/integrations/prometheus.md \
docs/admin/security/audit-logs.md \
docs/admin/setup/configuration-reference.md \
docs/reference/cli/index.md \
coderd/apidoc/swagger.json \
coderd/rbac/object_gen.go \
Expand Down Expand Up @@ -153,6 +154,12 @@ _gen/bin/clidocgen: $(CLIDOCGEN_INPUTS) | _gen
@mkdir -p _gen/bin
go build -o $@ ./scripts/clidocgen

# configdocgen reflects over codersdk.DeploymentValues to produce the
# configuration reference page.
_gen/bin/configdocgen: $(wildcard scripts/configdocgen/*.go) $(wildcard codersdk/*.go) | _gen
@mkdir -p _gen/bin
go build -o $@ ./scripts/configdocgen

_gen/bin/dbdump: $(wildcard coderd/database/gen/dump/*.go) $(DBDUMP_INPUTS) | _gen
@mkdir -p _gen/bin
go build -o $@ ./coderd/database/gen/dump
Expand Down Expand Up @@ -998,6 +1005,7 @@ GEN_FILES := \
docs/reference/cli/index.md \
docs/admin/security/audit-logs.md \
docs/install/releases/feature-stages.md \
docs/admin/setup/configuration-reference.md \
coderd/apidoc/swagger.json \
docs/manifest.json \
provisioner/terraform/testdata/version \
Expand Down Expand Up @@ -1096,6 +1104,7 @@ gen/mark-fresh:
docs/reference/cli/index.md \
docs/admin/security/audit-logs.md \
docs/install/releases/feature-stages.md \
docs/admin/setup/configuration-reference.md \
coderd/apidoc/swagger.json \
docs/manifest.json \
site/e2e/provisionerGenerated.ts \
Expand Down Expand Up @@ -1342,6 +1351,13 @@ docs/install/releases/feature-stages.md: \
pnpm exec markdown-table-formatter "$$tmpfile" && \
mv "$$tmpfile" "$@" && rm -rf "$$tmpdir"

docs/admin/setup/configuration-reference.md: node_modules/.installed $(wildcard scripts/configdocgen/*.go) $(wildcard codersdk/*.go) _gen/bin/configdocgen | _gen
tmpdir=$$(mktemp -d -p _gen) && tmpfile=$$(realpath "$$tmpdir")/$(notdir $@) && \
_gen/bin/configdocgen --out="$$tmpfile" && \
pnpm exec markdownlint-cli2 --fix "$$tmpfile" && \
pnpm exec markdown-table-formatter "$$tmpfile" && \
mv "$$tmpfile" "$@" && rm -rf "$$tmpdir"

coderd/apidoc/.gen: \
node_modules/.installed \
scripts/apidocgen/node_modules/.installed \
Expand Down
Loading
Loading