You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, in order to use doccards you need to write a .mdx file, import and use DocCard or DocCardList react components along with our findSidebarItem in docUtils.js. This is quite some boilerplate code for oasis-core, oasis-sdk and other repositories which in general only include plain markdown files. Since there is no standard markdown syntax for doccards, we should still strive to use standard markdown so it is valid outside of docusaurus.
I suggest we use standard markdown syntax for doccards and then wrap it with actual components using remark as follows.
if the doccard syntax above appears inside .md file (and not .mdx), will docusaurus want to compile <DocCardList> syntax inside "plain" .md file?
the @[doccard](some/link) will show doccard as text on the link. If there are multiple doccards one after another, that will be pretty nondescriptive
Alternatives:
Instead of using doccard literal, perhaps just placing @ in front of the link is sufficient? Or some other magic symbol, like ! or =? e.g. =[../../some/file.md]=
Maybe we could unify doccard and doccard list, so that if there is a single item, use doccard and for more items, doccardlist? Is there a way to set the number of doccards per row?
Check vuepress1&2, if they provide any better markdown syntax for doccards.
The text was updated successfully, but these errors were encountered:
A doc card is created for each paragraph. In the example above, two doc IDs and one external link (with "Oasis Team" doc card label taken from the link).
if a bullet list exists where each entry is a simple link without children (to avoid transforming TOCs to doccards), for example:
# See Also
- [Run validator node](../node/run-your-node/validator-node.md)
- [Consensus layer](https://github.com/oasisprotocol/oasis-core/main/blob/docs/consensus/README.md)
- [Oasis Team](https://oasisprotocol.org/about-us)
A doc card list is generated.
Pros:
visible on github and other editors as normal links
Cons:
no obvious way of saying not to render links as doc cards. Does this pose an issue?
Currently, in order to use doccards you need to write a .mdx file, import and use
DocCard
orDocCardList
react components along with ourfindSidebarItem
indocUtils.js
. This is quite some boilerplate code for oasis-core, oasis-sdk and other repositories which in general only include plain markdown files. Since there is no standard markdown syntax for doccards, we should still strive to use standard markdown so it is valid outside of docusaurus.I suggest we use standard markdown syntax for doccards and then wrap it with actual components using remark as follows.
Single-line doccard:
would be transformed into
And for doccard list:
would be transformed into:
Potential issues:
<DocCardList>
syntax inside "plain" .md file?@[doccard](some/link)
will showdoccard
as text on the link. If there are multiple doccards one after another, that will be pretty nondescriptiveAlternatives:
doccard
literal, perhaps just placing@
in front of the link is sufficient? Or some other magic symbol, like!
or=
? e.g.=[../../some/file.md]=
The text was updated successfully, but these errors were encountered: