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
docs: update documentation for community import implementation
- document rationale in ARCHITECTURAL_DECISIONS.md
- explain plugin configuration and workarounds
- add contributor guidelines for community docs
- document why files are committed to git
- update README.md accordingly
Signed-off-by: Scott Rigby <[email protected]>
Copy file name to clipboardExpand all lines: ARCHITECTURAL_DECISIONS.md
+71Lines changed: 71 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -336,6 +336,77 @@ Remove them only after:
336
336
2. All redirects are tested and working
337
337
3. No rollback scenarios require Hugo functionality
338
338
339
+
## Community Documentation Import
340
+
341
+
### Helm-Specific Requirement
342
+
343
+
The Helm project maintains community governance documents in a [separate repository](https://github.com/helm/community) that need to be included in the website as an unversioned documentation section with proper Docusaurus integration.
344
+
345
+
### Solution
346
+
347
+
Uses [docusaurus-plugin-remote-content](https://github.com/rdilweb/docusaurus-plugin-remote-content) to import and transform content at build time.
348
+
349
+
**Architecture:**
350
+
-**Multi-instance docs:** Community docs are a separate Docusaurus docs plugin instance with `id: "community"`, creating `/community/*` URLs
351
+
-**Content transformation:** Custom functions in `src/utils/communityDocsTransforms.js` handle all content processing
352
+
-**Configuration:** Centralized in `docusaurus.config.js` under `customFields.communityDocs`
353
+
-**Files committed to Git:** Imported files are tracked in version control to maintain clean git status and avoid complex .gitignore management
354
+
-**Build settings:** Uses `performCleanup: false` to prevent file deletion during i18n builds (workaround for [plugin issue #98](https://github.com/rdilweb/docusaurus-plugin-remote-content/issues/98))
355
+
356
+
### Content Transformation Features
357
+
358
+
**Import notice headers:** Every imported file gets a warning header indicating it shouldn't be edited directly, with a link to the source file in the helm/community repository.
359
+
360
+
**HIP (Helm Improvement Proposal) formatting:** HIP documents get special treatment:
361
+
- Metadata fields (hip, authors, created, status, etc.) displayed as a markdown table
362
+
- Sidebar labels include HIP number for easy navigation (e.g., "0023: Utilize Server Side Apply")
363
+
- Frontmatter cleaned to remove duplicate metadata
364
+
365
+
**Plain text file handling:**`.txt` files (like meeting notes) are automatically:
366
+
- Converted to `.md` files during import
367
+
- Title extracted from content headers
368
+
- Content wrapped in code blocks to preserve formatting
369
+
370
+
**Link transformations:** Only applied for configured exceptions - most links work as-is since the file structure mirrors the source repository.
371
+
372
+
### Why imported files are committed to Git
373
+
374
+
The `/community` directory mixes imported files from helm/community with locally-maintained community docs. Committing imported files to Git:
375
+
376
+
1.**Avoids complex .gitignore patterns** - No need to maintain a parallel list of which specific files to ignore
377
+
2.**Provides clean git status** - Contributors don't see dozens of untracked files during development
378
+
3.**Enables offline development** - With `noRuntimeDownloads: true`, `yarn start` works without network access
379
+
4.**Simplifies mental model** - All files in `/community` are tracked, regardless of source
380
+
381
+
The tradeoff of content duplication is acceptable since these files rarely change structure and the import notices clearly indicate they shouldn't be edited locally.
382
+
383
+
### Commands
384
+
385
+
-`yarn download-remote-community` - Fetch and transform latest content from helm/community repository
386
+
-`yarn clear-remote-community` - Remove imported files (useful for testing)
387
+
388
+
### Automated Updates
389
+
390
+
A GitHub Action (`.github/workflows/update-community-docs.yml`) runs weekly to:
391
+
1. Check for updates in helm/community repository
392
+
2. Apply transformations and import changes
393
+
3. Create or update a PR if there are changes
394
+
4. Skip if an identical PR already exists
395
+
396
+
The workflow can also be triggered manually through GitHub Actions UI.
397
+
398
+
### For Contributors
399
+
400
+
To add new community documents:
401
+
1. Add entry to `customFields.communityDocs.remoteDocs` in `docusaurus.config.js`
402
+
2. Include optional `meta` field for frontmatter overrides
403
+
3. Add link exceptions only if specific links need custom mapping
404
+
4. Run `yarn download-remote-community` to test import locally
405
+
406
+
To modify transformation logic:
407
+
1. Edit `src/utils/communityDocsTransforms.js` for content processing
408
+
2. Test changes with `yarn download-remote-community`
Copy file name to clipboardExpand all lines: README.md
+19-1Lines changed: 19 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,6 +36,24 @@ Helm v3 documentation is located under `versioned-docs/version-3`. The sidebar f
36
36
37
37
For earlier versions, see the dev-v2 branch of the main Helm repo [here](https://github.com/helm/helm/tree/dev-v2/docs).
38
38
39
+
### Community Documentation
40
+
41
+
The Community section imports content from the [helm/community](https://github.com/helm/community) repository. To manage these imported docs:
42
+
43
+
#### Download/Update Community Docs
44
+
```bash
45
+
yarn download-remote-community
46
+
```
47
+
This command fetches the latest community documentation from the helm/community repository and applies transformations for proper integration.
48
+
49
+
#### Clear Community Docs
50
+
```bash
51
+
yarn clear-remote-community
52
+
```
53
+
This removes the imported community documentation files (useful before re-importing or for troubleshooting).
54
+
55
+
The imported docs configuration is defined in `docusaurus.config.js` under `customFields.communityDocs`. See `ARCHITECTURAL_DECISIONS.md` for details on the implementation.
56
+
39
57
### Updating the Helm CLI Reference Docs
40
58
41
59
The documentation for the list of Helm CLI Commands are [exported](https://github.com/helm/helm/blob/a6b2c9e2126753f6f94df231e89b2153c2862764/cmd/helm/root.go#L169) from the main helm project repo and rendered [here on the website](https://helm.sh/docs/helm) as a reference.
@@ -190,7 +208,7 @@ For more information about cutting new docs versions, see [Versioning](https://d
190
208
191
209
**We welcome content translations** to our site and our docs, to help expand access to Helm around the world.
192
210
193
-
Helm.sh supports multiple languages. Please refer to the [Localizing Helm Documentation](/community/localization) for a guide on translating and configuring content for international users.
211
+
Helm.sh supports multiple languages. Please refer to the [Localizing Helm Documentation](https://helm.sh/docs/community/localization/) for a guide on translating and configuring content for international users.
0 commit comments