It is possible to inherit documentation? #1984
Unanswered
StarLederer
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Is it possible to selectively inherit parts of documentation from another package and include it in your own? If so, how can I do that?
I am investigating the possibility to use VitePress to set a standard for how UnoCSS community extensions should be documented, which at the moment does not go much further than plain READMEs. I probably should not explain what UnoCSS is but what is important is that it relies on extensions to actually do anything and these extensions might benefit from including parts of each other in their own code. The problem is, I have so far been unable to figure out how to inherit not only JavaScript but also parts of the documentation that describe those functions.
For example, lets take a project with the following function
and its documentation
How can I make a package that not only reexports
createUsefulThings
but also reusescreateUsefulThings.md
in its documentation?I already tried using
rewrites
to point at md files added as a git submodule but that didn't work because VitePress ignores everything outside the docs root. Also sometimes I want to inherit things for the sidebar and unless I am inheriting entire sections it seems quite tricky to selectively pick things out because it is just an array and the parent documentation can change the order of things around causing unexpected changes without producing warnings or type errorsBeta Was this translation helpful? Give feedback.
All reactions