@peeja you can access a function's docstring with the doc
function.. can you use that?
@kauko Right, that's exactly what I mean. If I do that in a defcard
, it's not interpreted as the documentation string for the card, it's interpreted as the content of the card, because it's not a string literal
Huh, tbh not really sure what you mean by the documentation.. it's been a while since I last used devcards
Trying to look at the docs. I see there's an :options
key, but I don't remember what it does exactly.
Ah, I meant, there's a :documentation key π
@peeja are you saying {:options {:documentation (doc my-component)}}
doesn't work..?
I mean the string that comes right after the name of the card: (defcard a-name "Some documentation" (a-component))
Does :documentation
do the same thing?
Yeah I think so
Ooh, I'll have to try thatβ¦
Heh, should've mentioned the :options from the get-go π Sorry. http://rigsomelight.com/devcards/#!/devdemos.custom_cards
It's documented pretty well in there
oh, it looks like :documentation is not under :options
it is its own key
Oh, I see, you can't use that with defcard
, though
I'll need to make my own macro?
whaa
I'm sure you can use it
Where do I give :documentation
?
huh
maybe you can't.. hmm
oh sorry http://rigsomelight.com/devcards/#!/devdemos.defcard_api
Here's the documentation π
Oh, you can also use it by implementing dc/IDevcardOptions
on the object in the card
I don't see :documentation
on http://rigsomelight.com/devcards/#!/devdemos.defcard_api
Try to put it in the :options map
that you can give as the last argument to defcard
No dice π
argh
should be there IMHO
PR time? π
Yeah, maybe π
Yeah, looks like those options are the :options
, and there's no way to set the :documentation
from there
(other than the string literal)