Skip to content

Commit c06950e

Browse files
tabernmchmarny
andauthored
site: eliminate docs duplication with build-time sync (#385)
Co-authored-by: Mark Chmarny <mchmarny@users.noreply.github.com> Co-authored-by: Mark Chmarny <mark@chmarny.com>
1 parent 87cb118 commit c06950e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+173
-17682
lines changed

.github/workflows/gh-pages.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ jobs:
6666

6767
- name: Build site (PR)
6868
if: github.event_name == 'pull_request'
69-
run: cd site && npm ci && npx vitepress build
69+
run: cd site && npm ci && npm run build
7070

7171
- name: Build site
7272
if: github.event_name != 'pull_request'
73-
run: cd site && npm ci && npx vitepress build
73+
run: cd site && npm ci && npm run build
7474

7575
- name: Upload artifact
7676
if: github.event_name != 'pull_request'

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,12 @@ tags
124124
site/.vitepress/cache/
125125
site/.vitepress/dist/
126126
site/node_modules/
127+
# Generated from docs/ by tools/sync-site-docs (do not edit directly)
128+
site/docs/user/
129+
site/docs/integrator/
130+
site/docs/contributor/
131+
site/docs/conformance/evidence/
132+
site/docs/conformance/index.md
127133

128134
# Claude
129135
.claude/settings.local.json

Makefile

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,17 @@ generate: ## Runs go generate for code generation
103103
@echo "Code generation completed"
104104

105105
.PHONY: lint
106-
lint: lint-go lint-yaml license check-agents-sync ## Lints the entire project (Go, YAML, and license headers)
106+
lint: lint-go lint-yaml license check-agents-sync check-docs-sidebar ## Lints the entire project (Go, YAML, and license headers)
107107
@echo "Completed Go and YAML lints and ensured license headers"
108108

109109
.PHONY: check-agents-sync
110110
check-agents-sync: ## Verifies AGENTS.md is in sync with .claude/CLAUDE.md
111111
@./tools/check-agents-sync
112112

113+
.PHONY: check-docs-sidebar
114+
check-docs-sidebar: ## Verifies all docs/ pages have sidebar entries in VitePress config
115+
@./tools/check-docs-sidebar
116+
113117
.PHONY: lint-go
114118
lint-go: ## Lints Go files with golangci-lint and go vet
115119
@set -e; \
@@ -226,19 +230,19 @@ docs: ## Serves Go documentation on http://localhost:6060
226230
.PHONY: site-serve
227231
site-serve: ## Serve documentation site locally
228232
@set -e; \
229-
echo "Starting documentation site on http://localhost:1313..."; \
230-
cd site && npm install && hugo serve --baseURL http://localhost:1313/
233+
echo "Starting documentation site on http://localhost:5173..."; \
234+
cd site && npm install && npm run dev
231235

232236
.PHONY: site-build
233237
site-build: ## Build documentation site
234238
@set -e; \
235239
echo "Building documentation site..."; \
236-
cd site && npm install && hugo --minify; \
237-
echo "Site built in site/public/"
240+
cd site && npm install && npm run build; \
241+
echo "Site built in site/.vitepress/dist/"
238242

239243
.PHONY: site-clean
240244
site-clean: ## Clean documentation build artifacts
241-
@rm -rf site/public site/resources
245+
@rm -rf site/.vitepress/dist site/.vitepress/cache
242246
@echo "Cleaned documentation build artifacts"
243247

244248
.PHONY: build

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ For developers contributing code, extending functionality, or working on AICR in
132132

133133
| Document | Description |
134134
|----------|-------------|
135-
| [Architecture Overview](contributor/README.md) | System design, patterns, and deployment topologies |
135+
| [Architecture Overview](contributor/index.md) | System design, patterns, and deployment topologies |
136136
| [CLI Architecture](contributor/cli.md) | Detailed CLI implementation and workflow diagrams |
137137
| [API Server Architecture](contributor/api-server.md) | HTTP server design, middleware, and endpoints |
138138
| [Data Architecture](contributor/data.md) | Recipe metadata system, criteria matching, and inheritance |
File renamed without changes.

docs/contributor/api-server.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1048,7 +1048,7 @@ export TAG=$(curl -s https://api.github.com/repos/NVIDIA/aicr/releases/latest |
10481048
gh attestation verify oci://ghcr.io/nvidia/aicrd:${TAG} --owner nvidia
10491049
```
10501050

1051-
For detailed CI/CD architecture, see [../CONTRIBUTING.md#github-actions--cicd](../../CONTRIBUTING.md#github-actions--cicd) and [README.md](README.md#cicd-architecture).
1051+
For detailed CI/CD architecture, see [CONTRIBUTING.md](https://github.com/NVIDIA/aicr/blob/main/CONTRIBUTING.md#github-actions--cicd) and [Architecture Overview](index.md#cicd-architecture).
10521052

10531053
### Local Build Configuration
10541054

docs/contributor/component.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,8 @@ The component registry (`recipes/registry.yaml`) supports these fields:
191191

192192
- Only add custom manifests when the Helm chart doesn't provide needed functionality
193193
- Use Helm template syntax (not Go templates) for manifest files
194-
- Reference values via `{{ index .Values "component-name" }}`
195-
- Make manifests conditional with `{{- if }}` blocks
194+
- Reference values via <code v-pre>{{ index .Values "component-name" }}</code>
195+
- Make manifests conditional with <code v-pre>{{- if }}</code> blocks
196196

197197
### Testing
198198

@@ -452,9 +452,9 @@ See [CLI Architecture](cli.md#deployer-framework-gitops-integration) for detaile
452452

453453
## See Also
454454

455-
- [Architecture Overview](README.md) - Complete bundler framework architecture
455+
- [Architecture Overview](index.md) - Complete bundler framework architecture
456456
- [CLI Architecture](cli.md) - Deployer framework and GitOps integration
457457
- [CLI Reference](../user/cli-reference.md) - Bundle generation commands
458458
- [API Reference](../user/api-reference.md) - Programmatic access (recipe generation only)
459-
- [Component Registry](../../recipes/registry.yaml) - Declarative component configuration
460-
- [Recipe Data README](../../recipes/README.md) - Recipe and component data overview
459+
- [Component Registry](https://github.com/NVIDIA/aicr/blob/main/recipes/registry.yaml) - Declarative component configuration
460+
- [Recipe Data](https://github.com/NVIDIA/aicr/tree/main/recipes) - Recipe and component data overview

docs/contributor/data.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The recipe system is a rule-based configuration engine that generates tailored s
2525
4. **Merging configurations** - Components, constraints, and values are merged with overlay precedence
2626
5. **Computing deployment order** - Topological sort of components based on dependency references
2727

28-
The recipe data is organized in [`recipes/`](../../recipes/) as multiple YAML files:
28+
The recipe data is organized in [`recipes/`](https://github.com/NVIDIA/aicr/tree/main/recipes) as multiple YAML files:
2929

3030
```
3131
recipes/
@@ -1292,5 +1292,5 @@ func initDataProvider(cmd *cli.Command) error {
12921292
- [CLI Architecture](cli.md) - How the CLI uses recipe data
12931293
- [CLI Reference](../user/cli-reference.md) - Complete CLI flag reference
12941294
- [API Server Architecture](api-server.md) - How the API serves recipes
1295-
- [OpenAPI Specification](../../api/aicr/v1/server.yaml) - Recipe API contract
1296-
- [Recipe Package Documentation](../../pkg/recipe/) - Go implementation details
1295+
- [OpenAPI Specification](https://github.com/NVIDIA/aicr/blob/main/api/aicr/v1/server.yaml) - Recipe API contract
1296+
- [Recipe Package Documentation](https://github.com/NVIDIA/aicr/tree/main/pkg/recipe) - Go implementation details
Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# AICR Architecture
22

3+
34
This directory contains architecture documentation for the AI Cluster Runtime (AICR) tooling.
45

56
## First Principles
@@ -38,8 +39,6 @@ This directory contains architecture documentation for the AI Cluster Runtime (A
3839
* The system provides validated configuration, not a new operational model.
3940

4041
**Why:** If adoption requires retraining users on “the right way” then our design has failed.
41-
42-
4342
## Components
4443

4544
- **[CLI Architecture](cli.md)**: Command-line tool (`aicr`) implementing all four workflow stages
@@ -719,7 +718,7 @@ The Bundler Framework provides an extensible system for generating deployment bu
719718
**3. BaseBundler Helper Pattern**
720719
**Rationale**: Common file operations across all bundlers
721720
**Implementation**: Struct embedding with methods (directory creation, file writing, template rendering, checksum generation)
722-
**Reference**: [pkg/component](../../pkg/component)
721+
**Reference**: [pkg/component](https://github.com/NVIDIA/aicr/tree/main/pkg/component)
723722

724723
**4. Registry Pattern**
725724
**Rationale**: Decoupled bundler registration; extensibility without modifying core code
@@ -950,8 +949,6 @@ Components are configured in `recipes/registry.yaml`. The bundler automatically
950949

951950
**Per-Component Bundle Generation**:
952951
The bundler generates a per-component Helm bundle with individual values and manifests for each component, based on the recipe's `componentRefs`.
953-
954-
955952
### Metrics and Observability
956953

957954
**Bundler Metrics** (Prometheus):
@@ -1222,9 +1219,9 @@ cosign verify-attestation \
12221219
- Source code in public repository
12231220
- Attestations queryable via `rekor-cli`
12241221

1225-
For detailed CI/CD documentation, see [../../.github/actions/README.md](../../.github/actions/README.md) and [CONTRIBUTING.md](../../CONTRIBUTING.md#github-actions--cicd).
1222+
For detailed CI/CD documentation, see [.github/actions](https://github.com/NVIDIA/aicr/tree/main/.github/actions) and [CONTRIBUTING.md](https://github.com/NVIDIA/aicr/blob/main/CONTRIBUTING.md#github-actions--cicd).
12261223

1227-
For supply chain security verification, see [../../SECURITY.md](../../SECURITY.md).
1224+
For supply chain security verification, see [SECURITY.md](https://github.com/NVIDIA/aicr/blob/main/SECURITY.md).
12281225

12291226
## E2E Testing Architecture
12301227

@@ -1323,7 +1320,7 @@ steps:
13231320
- **Agent Testing**: Validates RBAC permissions and Job execution
13241321
- **Bundle Verification**: Ensures deployment artifacts are correct
13251322

1326-
For detailed usage, see [../../CONTRIBUTING.md#end-to-end-testing](../../CONTRIBUTING.md#end-to-end-testing).
1323+
For detailed usage, see [CONTRIBUTING.md](https://github.com/NVIDIA/aicr/blob/main/CONTRIBUTING.md#end-to-end-testing).
13271324

13281325
## References and Further Reading
13291326

docs/contributor/validator.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,6 @@ When adding a new upstream check:
364364
## See Also
365365

366366
- [Validator Extension Guide](../integrator/validator-extension.md) — External validators via `--data`
367-
- [Validator Catalog Reference](../../recipes/validators/README.md) — Catalog schema and entries
368-
- [Validator V2 ADR](../design/002-validatorv2-adr.md) — Architecture decision record
367+
- [Validator Catalog Reference](https://github.com/NVIDIA/aicr/tree/main/recipes/validators) — Catalog schema and entries
368+
- [Validator V2 ADR](https://github.com/NVIDIA/aicr/blob/main/docs/design/002-validatorv2-adr.md) — Architecture decision record
369369
- [CLI Reference](../user/cli-reference.md#aicr-validate) — Validate command flags

0 commit comments

Comments
 (0)