You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enhance README and guide generator to support nested directories for dynamic guides
- Updated README.md to include instructions for configuring remote guides from nested directories, detailing the use of `targetFilename` for top-level page generation.
- Modified guide-generator.js to add new dynamic guides for 'Prefix Cache Storage' and 'Prefix Cache Storage - CPU', including sidebar positions and descriptions.
Signed-off-by: Pete Cheslock <[email protected]>
-**Components** sync from their individual release tags
99
99
-**Guides** sync from the llm-d/llm-d release tag
100
+
-**Architecture docs** sync from the llm-d/llm-d release tag
100
101
-**Community docs** always sync from `main` branch (latest)
101
102
103
+
### Understanding Versioned vs. Always-Current Content
104
+
105
+
The remote content system supports two sync strategies:
106
+
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):
- These are configured via `COMMON_REPO_CONFIGS['llm-d-main'].branch = 'main'` in `component-configs.js`
118
+
119
+
Community documentation stays current with the latest policies and processes, independent of releases. The `branch` field in `COMMON_REPO_CONFIGS` controls this behavior.
120
+
121
+
**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
126
+
102
127
### Testing content from a feature branch
103
128
104
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.
105
130
131
+
### Supporting remote guides from nested directories
132
+
133
+
Dynamic guides are configured in `remote-content/remote-sources/guide/guide-generator.js`. Each entry in `DYNAMIC_GUIDES` points at a `README.md` inside `guides/<dirName>/` in the main repo. By default, the generator mirrors the directory structure when it creates docs: `dirName: 'some-folder/sub-guide'` produces `some-folder/sub-guide.md` under `docs/guide/Installation`, and the sidebar groups pages under a folder.
134
+
135
+
If you want to surface a nested source as a top-level page, add an optional `targetFilename` to the guide definition. Example:
136
+
137
+
```javascript
138
+
{
139
+
dirName:'prefix-cache-storage/cpu',
140
+
title:'Prefix Cache Storage - CPU',
141
+
description:'…',
142
+
sidebarPosition:5,
143
+
targetFilename:'prefix-cache-storage-cpu.md'
144
+
}
145
+
```
146
+
147
+
With `targetFilename`, the generator still reads `guides/prefix-cache-storage/cpu/README.md`, but it writes the output to `docs/guide/Installation/prefix-cache-storage-cpu.md`, letting the page appear alongside other top-level guides. Leave `targetFilename` out to keep the default nested behavior.
148
+
106
149
**Manual updates:** You can also manually edit `components-data.yaml` if needed.
0 commit comments