nimibook
nimibook copied to clipboard
Allow embedding a nim file as an nbCode block
This came to me while writing on the owlkettle nimibook.
Owlkettle has a bunch of example.nim files for example applications for individual widgets. I would love to be able to embed those inside of the owlkettle nimibook instead of linking to the files.
The idea would be something like:
import nimib, nimibook
nbInit(theme = useNimibook)
nbText: """
## Example
Look at this very cool example of a scale widget
"""
nbCode(file = "owlkettle/examples/widget/scale.nim")
nbText: """
As you can see it does wonderful things etc. etc.
"""
...
This is just an example to demonstrate what I mean, what the Syntax for it looks like exactly isn't all that important.