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
Copy file name to clipboardExpand all lines: ARCHITECTURAL_DECISIONS.md
+27-39Lines changed: 27 additions & 39 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -340,61 +340,49 @@ Remove them only after:
340
340
341
341
### Helm-Specific Requirement
342
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.
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
344
345
345
### Solution
346
346
347
347
Uses [docusaurus-plugin-remote-content](https://github.com/rdilweb/docusaurus-plugin-remote-content) to import and transform content at build time.
348
348
349
349
**Architecture:**
350
-
-**Multi-instance docs:** Community docs are a separate Docusaurus docs plugin instance with `id: "community"`
351
-
-**Content transformation:** Custom functions in `src/utils/communityDocsTransforms.js` handle frontmatter injection and link rewriting
352
-
-**Configuration:** Centralized in `docusaurus.config.js` under `customFields.communityDocs` for maintainability
353
-
354
-
### Key Design Decisions
355
-
356
-
**Why remote content instead of git submodule:**
357
-
- Allows selective import of specific files
358
-
- Enables content transformation during import (frontmatter, link fixing)
359
-
- Simpler for contributors who don't need to understand submodule workflows
-**H1 stripping:** When adding `title` frontmatter, the markdown H1 would override it. Stripping H1 allows the frontmatter title to control the page title
364
-
-**Link rewriting:** Relative markdown links from source repo must map to website URL structure
365
-
366
-
### Configuration Structure
367
-
368
-
```javascript
369
-
customFields: {
370
-
communityDocs: {
371
-
remoteDocs: [/* file list with optional metadata */],
372
-
linkExceptions: {/* manual link overrides */}
373
-
}
374
-
}
375
-
```
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`
376
353
377
-
The configuration is defined as a `customFields` constant before the main config object, allowing derived values to be calculated upfront. Helper functions in `src/utils/communityDocsConfig.js` derive paths and create the edit URL function. The plugins can then be defined inside the config object using these pre-calculated values, resulting in a cleaner structure.
354
+
### Content Transformation Features
378
355
379
-
### Commands
356
+
**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.
357
+
358
+
**HIP (Helm Improvement Proposal) formatting:** HIP documents get special treatment:
359
+
- Metadata fields (hip, authors, created, status, etc.) displayed as a markdown table
360
+
- Sidebar labels include HIP number for easy navigation (e.g., "0023: Utilize Server Side Apply")
361
+
- Frontmatter cleaned to remove duplicate metadata
380
362
381
-
-`yarn download-remote-community` - Fetch and transform latest content
382
-
-`yarn clear-remote-community` - Remove imported files (useful before re-import)
363
+
**Plain text file handling:**`.txt` files (like meeting notes) are automatically:
364
+
- Converted to `.md` files during import
365
+
- Title extracted from content headers
366
+
- Content wrapped in code blocks to preserve formatting
383
367
384
-
### Edit URL Handling
368
+
**Link transformations:** Only applied for configured exceptions - most links work as-is since the file structure mirrors the source repository.
385
369
386
-
The plugin configuration includes custom `editUrl` logic that:
387
-
1. Points imported files back to the helm/community repository
388
-
2. Points locally-created files to helm-www repository
389
-
3. Preserves correct paths for both scenarios
370
+
### Commands
371
+
372
+
-`yarn download-remote-community` - Fetch and transform latest content via GitHub API
373
+
-`yarn clear-remote-community` - Remove imported files before re-import
390
374
391
375
### For Contributors
392
376
393
377
To add new community documents:
394
378
1. Add entry to `customFields.communityDocs.remoteDocs` in `docusaurus.config.js`
395
-
2. Include any necessary frontmatter in the `meta` field
396
-
3. Add link exceptions if the document has special link requirements
397
-
4. Run `yarn download-remote-community` to import
379
+
2. Include optional `meta` field for frontmatter overrides
380
+
3. Add link exceptions only if specific links need custom mapping
381
+
4. Run `yarn download-remote-community` to test import locally
382
+
383
+
To modify transformation logic:
384
+
1. Edit `src/utils/communityDocsTransforms.js` for content processing
385
+
2. Test changes with `yarn download-remote-community`
0 commit comments