gelisam / klister

an implementation of stuck macros
BSD 3-Clause "New" or "Revised" License
128 stars 11 forks source link

Render the documentation #203

Open gelisam opened 1 year ago

gelisam commented 1 year ago

Currently, the Guide is the Readme.md, plus the .kl files to which it links. Those .kl files are rendered in typewriter font, which isn't as nice as GitHub's nicely rendered markdown files. But the worst part is the fact that the reader is expected to switch back and forth between the .kl file and the .golden file in order to see the output of the examples. It would be nice to render those files to markdown and to include the output of the examples.

Similarly, the Reference currently consists of two files, examples/primitives-documentation.kl for the examples, and examples/primitives-documentation.golden for the types. It would be nice to combine the two into a single document. I don't think we have enough primitives to warrant searchable documentation like readthedocs yet.

I don't know if the most expedient way to implement this would be to implement a Scribble-like #lang, to use Scribble directly, calling out to the klister executable to produce the example outputs, or maybe just some simple bash script.

david-christiansen commented 1 year ago

What about setting up something like Sphinx and readthedocs.io? That worked well for Idris, and Sphinx has good primitives for technical documentation without needing a bajillion horrid hacks the way Markdown and Bash would.