Skip to content

Conversation

@tripolskypetr
Copy link
Contributor

@tripolskypetr tripolskypetr commented Mar 26, 2025

Metadata required to build the pretty folder tree for TypeDoc

image

@marcusolsson
Copy link
Owner

Thanks for the contribution! Better interop with TypeDoc sounds great 👍

I'm thinking this should probably be configurable though.

With no options provided

yarn generate --input ./definitions.d.ts --output ./docs
---
title: AdapterUtils
---

With group option

yarn generate --input ./definitions.d.ts --output ./docs --group "API reference"
---
title: AdapterUtils
group: API reference
---

With title prefix option

yarn generate --input ./definitions.d.ts --output ./docs --group "API reference" --title-prefix "dts-docs/api-reference/"
---
title: dts-docs/api-reference/AdapterUtils
group: API reference
---

This wouldn't include function or class, but on top of my head, I don't have a good idea for how to implement dynamic title prefixes without introducing a full templating system.

For example:

yarn generate --input ./definitions.d.ts --output ./docs --group "API reference" --title-template "dts-docs/api-reference/{{ type }}/{{ name }}"

Or something like it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants