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

Support custom code fences for rendering examples #89

Closed
vecerek opened this issue Nov 6, 2024 · 0 comments · Fixed by #90
Closed

Support custom code fences for rendering examples #89

vecerek opened this issue Nov 6, 2024 · 0 comments · Fixed by #90
Labels
enhancement New feature or request

Comments

@vecerek
Copy link
Contributor

vecerek commented Nov 6, 2024

What is the problem this feature would solve?

Right now, all examples are rendered using the standard ```ts and ``` code fences. This is not bad but sometimes the examples within the API reference could use more interactivity. For example, some examples could benefit from being rendered using shiki twoslash.

What is the feature you are proposing to solve the problem?

This feature would allow people to control the exact fences to be rendered on a per example basis.

What alternatives have you considered?

Global-config to control code fences for all examples but I abandoned the idea because having too many shiki twoslash code snippets could have a serious impact on build times in certain static site generators

@vecerek vecerek added the enhancement New feature or request label Nov 6, 2024
vecerek added a commit to vecerek/docgen that referenced this issue Nov 6, 2024
vecerek added a commit to vecerek/docgen that referenced this issue Nov 6, 2024
vecerek added a commit to vecerek/docgen that referenced this issue Nov 6, 2024
gcanti pushed a commit that referenced this issue Nov 7, 2024
@gcanti gcanti closed this as completed in #90 Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant