Skip to content

Commit b575abb

Browse files
committed
docs: update README to reflect main branch syncing strategy
- Document that all content syncs from main branch - Explain that version tags are only for Latest Release page display - Update 'Testing from feature branch' instructions - Update 'Adding New Components' example - Add Latest Release page to documentation types list
1 parent af31dde commit b575abb

File tree

2 files changed

+42
-34
lines changed

2 files changed

+42
-34
lines changed

README.md

Lines changed: 40 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ This repository contains two types of documentation:
1313
1. **Local Documentation** - Written directly in this repository (blog posts, landing pages, etc.)
1414
2. **Remote Synced Content** - Automatically synced from other llm-d repositories during build
1515

16-
Most technical documentation is automatically synced from source repositories to ensure accuracy and consistency:
17-
- **Architecture docs** (`/docs/architecture/`) - Synced from component repositories
16+
Most technical documentation is automatically synced from the `main` branch of source repositories to ensure accuracy and consistency:
17+
- **Architecture docs** (`/docs/architecture/`) - Synced from llm-d/llm-d repository
1818
- **User guides** (`/docs/guide/`) - Synced from the main llm-d repository
19-
- **Component docs** (`/docs/architecture/Components/`) - Auto-generated from individual component repos
19+
- **Component docs** (`/docs/architecture/Components/`) - Synced from individual component repos
2020
- **Community docs** (`/docs/community/`) - Synced from the main repository
21+
- **Latest Release page** (`/docs/architecture/latest-release.md`) - Generated from `components-data.yaml`
2122

2223
Files with remote content show a "Content Source" banner at the bottom with links to edit the original source.
2324

@@ -28,9 +29,10 @@ Files with remote content show a "Content Source" banner at the bottom with link
2829
The remote content system automatically downloads and syncs content from GitHub repositories during the build process:
2930

3031
1. **Static Configuration** - `remote-content/remote-sources/components-data.yaml` contains:
31-
- Release version information (which tag to sync from)
32-
- List of all components with their descriptions and versions
32+
- Release version information (displayed on the Latest Release page)
33+
- List of all components with their descriptions and version tags
3334
- Repository locations and metadata
35+
- **Note:** All content syncs from `main` branch; version tags are only used for display on the Latest Release page
3436

3537
2. **Content Sources** - Individual files in `remote-content/remote-sources/` define:
3638
- Which repositories to sync from
@@ -93,40 +95,46 @@ git push # Triggers automatic deployment
9395
```
9496

9597
**What gets updated:**
96-
- Release version, date, and URLs shown on the Components page
97-
- Component descriptions and version tags
98-
- **Components** sync from their individual release tags
99-
- **Guides** sync from the llm-d/llm-d release tag
100-
- **Architecture docs** sync from the llm-d/llm-d release tag
101-
- **Community docs** always sync from `main` branch (latest)
98+
- Release version, date, and URLs shown on the **Latest Release** page
99+
- Component descriptions and version tags displayed in the component table
100+
- **Note:** All documentation content (architecture, guides, components, community) syncs from the `main` branch
101+
- The version tags in YAML are only used to render the Latest Release page showing what versions are in the release
102102

103-
### Understanding Versioned vs. Always-Current Content
103+
### Content Syncing Strategy
104104

105-
The remote content system supports two sync strategies:
105+
**All documentation syncs from the `main` branch** of source repositories. This ensures documentation always reflects the latest development state.
106106

107-
**Versioned Content** (syncs from release tags):
108-
- **Guides** (`docs/guide/`) - Uses `RELEASE_INFO.version` from `components-data.yaml`
109-
- **Architecture** (`docs/architecture/`) - Uses `RELEASE_INFO.version` from `components-data.yaml`
110-
- **Components** (`docs/architecture/Components/`) - Each component uses its own `version` field from `components-data.yaml`
111-
- **Infrastructure Providers** (`docs/guide/InfraProviders/`) - Uses `RELEASE_INFO.version` from `components-data.yaml`
112-
113-
These docs are pinned to specific release tags (e.g., `v0.3.1`) to ensure documentation matches the released code. When you update `release.version` in `components-data.yaml`, all versioned content automatically syncs from the new tag.
114-
115-
**Always-Current Content** (syncs from `main` branch):
107+
**Content synced from `main`:**
108+
- **Architecture** (`docs/architecture/architecture.mdx`) - Main llm-d README
109+
- **Component docs** (`docs/architecture/Components/*.md`) - Individual component READMEs
110+
- **Guides** (`docs/guide/`) - Installation and usage guides
116111
- **Community docs** (`docs/community/`) - Contributing guidelines, Code of Conduct, Security Policy, SIGs
117-
- These are configured via `COMMON_REPO_CONFIGS['llm-d-main'].branch = 'main'` in `component-configs.js`
112+
- **Infrastructure Providers** (`docs/guide/InfraProviders/`)
113+
- **Usage docs** (`docs/usage/`)
118114

119-
Community documentation stays current with the latest policies and processes, independent of releases. The `branch` field in `COMMON_REPO_CONFIGS` controls this behavior.
115+
**Generated from YAML (not synced):**
116+
- **Latest Release page** (`docs/architecture/latest-release.md`) - Generated from `components-data.yaml`
117+
- Shows release version, date, and link to GitHub release
118+
- Displays component version table with links to specific release tags
119+
- This is the only place version tags from YAML are used
120120

121121
**How it works:**
122-
- `generateRepoUrls()` in `component-configs.js` prefers `version` over `branch` when both exist
123-
- Versioned content sources call `findRepoConfig('llm-d')` and use `RELEASE_INFO.version`
124-
- Community sources call `findRepoConfig('llm-d')` and use `repoConfig.branch` (which is `'main'`)
125-
- This separation lets you cut releases without worrying about stale community policies
122+
- `generateRepoUrls()` in `component-configs.js` always returns `main` as the branch for content syncing
123+
- Version tags in `components-data.yaml` are used by `components-generator.js` to render the Latest Release page
124+
- The `sync-release.mjs` script updates YAML with release metadata from GitHub, but this doesn't affect which branch content syncs from
126125

127126
### Testing content from a feature branch
128127

129-
To preview remote docs from a work-in-progress branch (for example `liu-cong-debug`), temporarily set `release.version` in `remote-content/remote-sources/components-data.yaml` to that branch name. Run `npm start` or `npm run build` to pull the branch content into the site. When testing is done, change `release.version` back to the released tag so production remains on the official docs.
128+
Since all content syncs from `main`, to test content from a different branch you need to temporarily modify the `generateRepoUrls()` function in `remote-content/remote-sources/component-configs.js`:
129+
130+
```javascript
131+
// Change this line temporarily:
132+
const ref = 'main';
133+
// To your feature branch:
134+
const ref = 'your-feature-branch';
135+
```
136+
137+
Run `npm start` or `npm run build` to pull the branch content. **Remember to change it back to `'main'` before committing.**
130138

131139
### Supporting remote guides from nested directories
132140

@@ -158,13 +166,13 @@ components:
158166
# ... existing components
159167
- name: llm-d-your-component
160168
org: llm-d
161-
branch: main
169+
sidebarLabel: Your Component # Display name in sidebar
162170
description: Description of your component
163-
category: Core Infrastructure
164171
sidebarPosition: 8
172+
version: v1.0.0 # Version tag shown on Latest Release page
165173
```
166174
167-
The component will automatically appear under `/docs/architecture/Components/` on the next build.
175+
The component README will be synced from `main` branch and appear at `/docs/architecture/Components/your-component.md` on the next build. The version tag is only used for display on the Latest Release page.
168176

169177
### Adding New Content Sources
170178

remote-content/remote-content.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const remoteContentPlugins = [
4646

4747
// Architecture remote content sources (docs/architecture/)
4848
architectureMainSource,
49-
...componentSources, // Spread all dynamically generated component sources
49+
...componentSources, // Spread all dynamically generated component sources (includes Latest Release page)
5050

5151
// Guide remote content sources (docs/guide/)
5252
...guideSources, // Spread all dynamically generated guide sources
@@ -60,4 +60,4 @@ const remoteContentPlugins = [
6060
// Add more remote sources here in the appropriate section above
6161
];
6262

63-
export default remoteContentPlugins;
63+
export default remoteContentPlugins;

0 commit comments

Comments
 (0)