-
Notifications
You must be signed in to change notification settings - Fork 3
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
Adopt typedoc for API docs #66
Conversation
✅ Deploy Preview for madata ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Thanks for working on this!
|
Good questions. Will dig into typedoc a bit. There might be something in there that we can use. |
We can have a custom CSS file, which will be referenced in the How would we call it? Where should we place it? In the root? In the |
This is planned to be in the core (hopefully) soon. Until then, there is a plugin that might help us get the desired result. But there is much hand work involved. Should we try to use it? |
We can start with |
We don't need typedoc for our own docs, but it would be nice to have it for the individual READMEs within each backend/format/etc. Can we use a different MD file than README.md for the root? It seems very weird to duplicate our homepage content there. Would it be easier to automate the handwork involved? |
We can. I just pushed the commit, which allows us to use
I'm sure it would. 😅 Will give it a try. |
Digging a bit further into the problem of generating doc pages from our READMEs, I learned that the plugin I was going to use for this doesn't work with the latest version of typedoc. 😭 Nor do other plugins from which that one was forked. I will try to find alternative solutions. 🤞 |
For the list of all supported themes, see https://shiki.matsu.io/themes#bundled-themes.
In Typedoc, we can use no extensibility point [1] to replace the built-in syntax highlighter (Shiki) with Prism. The only way to do that is to write a custom theme that (somehow) uses another syntax highlighter or doesn't highlight code blocks at all. I tried but failed — there's a ton of stuff to know to be able to do that (at least from my perspective). However, we can make the built-in markdown plugin (Marked) use a custom highlight function instead of the one that calls the Typedoc built-in syntax highlighter. That means that our markdown files and code blocks in the code comments (Typedoc supports markdown in comments) can be highlighted by Prism. [1] https://discord.com/channels/508357248330760243/829307039447515176/1202594912051273848
Dmitry, let's merge this since it's clearly better than the current state, then we can improve it later. Do you agree? |
Absolutely! I almost lost my mind trying to find a way to make it work we wanted. 😅 |
Closes #63.
The docs are much better now! 🤩
https://deploy-preview-66--madata.netlify.app/api/