Skip to content

Commit

Permalink
fix(core): expose group descriptions to module indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
tgreyuk committed Dec 25, 2024
1 parent e798507 commit 87d044e
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/swift-seahorses-warn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'typedoc-plugin-markdown': patch
---

- Expose group descriptions to module indexes.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ export function reflectionIndex(
groups?.forEach((reflectionGroup) => {
if (reflectionGroup.categories) {
md.push(heading(options.headingLevel, reflectionGroup.title) + '\n');
if (reflectionGroup.description) {
md.push(
this.helpers.getCommentParts(reflectionGroup.description) + '\n',
);
}
reflectionGroup.categories.forEach((categoryGroup) => {
md.push(
heading(options.headingLevel + 1, categoryGroup.title) + '\n',
Expand All @@ -43,6 +48,11 @@ export function reflectionIndex(
});
} else {
md.push(heading(options.headingLevel, reflectionGroup.title) + '\n');
if (reflectionGroup.description) {
md.push(
this.helpers.getCommentParts(reflectionGroup.description) + '\n',
);
}
md.push(this.helpers.getGroupIndex(reflectionGroup) + '\n');
}
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
/**
* A module that contains custom groupings
*
* @groupDescription CustomGroupA
*
* Group description for CustomGroupA
*
* @module
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1035,6 +1035,8 @@ A module that contains custom groupings
### CustomGroupA
Group description for CustomGroupA
| Variable | Description |
| :------ | :------ |
| [variabelA](variables/variabelA.md) | - |
Expand Down

0 comments on commit 87d044e

Please sign in to comment.