Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use {group} in textContentMappings #715

Closed
Huxpro opened this issue Nov 7, 2024 · 1 comment
Closed

Use {group} in textContentMappings #715

Huxpro opened this issue Nov 7, 2024 · 1 comment
Labels
enhancement fixed Fix implemented in latest version.

Comments

@Huxpro
Copy link

Huxpro commented Nov 7, 2024

What package is the feature request related to?

typedoc-plugin-markdown

Background

@group is useful to simulate custom member types, e.g. @group Events, @group Components.

By allowing the use of {group}, it will be convenient to title file as Event: onClick or Component: Button() via textContentMappings.

Proposed solution

Support {group} in textContentMappings, or even a callback that does the string interpolation?

Maybe it's better to build a custom theme for this use case?

@tgreyuk
Copy link
Member

tgreyuk commented Nov 27, 2024

In typedoc-plugin-markdown@4.3.0 you can do the following with a JS config file:

 pageTitleTemplates: {
    member: (args) => `${args.group.slice(0, -1)}: ${args.name}`,
  },

Example:

https://github.com/typedoc2md/typedoc-plugin-markdown-scratchpad/blob/main/issues/715/docs/md/functions/Button.md

@tgreyuk tgreyuk added the fixed Fix implemented in latest version. label Nov 27, 2024
@tgreyuk tgreyuk closed this as completed Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement fixed Fix implemented in latest version.
Projects
None yet
Development

No branches or pull requests

2 participants