8 ms·
Codapi – Interactive code examples for documentation, education and fun
- nalgeon 2y agoI like to explain things by example, and interactive examples are even better. So I built a sandbox server that lets you run virtually any software. And a widget to easily add interactive code examples to any kind of technical documentation. You can use it to build your own sandboxes, or use existing ones to write interactive guides like these: https://github.com/nalgeon/tryxinyminutes https://github.com/nalgeon/tryxinyminutes
- refset 2y agoCodapi looks very slick! It's great that you kept everything generic enough to support many different backend use cases. Coincidentally my colleagues recently built a custom version of almost this exact same interactive UX for writing SQL tutorials: https://docs.xtdb.com/tutorials/immutability-walkthrough/part-1.html https://docs.xtdb.com/tutorials/immutability-walkthrough/par... If only you had launched sooner :)
- mtlynch 2y agoCool to see this here, Anton! If you can still edit your title, I suggest prefixing this post with "Show HN: " so that it's obvious that you're the author sharing your project.
- Terretta 2y agoLooking for this that already integrates with e.g. mkdocs... In particular, the narrowest use case we want is simply exercising REST APIs (and GraphQL APIs) with changed up params, something like a baby embedded Postman. Expanding that to single boxes of a notebook or tiny Python runners like this (or as are used in Code Interpreter in ChatGPT) is even better. Anyone already have or working on these? (For our use case, assume the user is browsing the docs with an SSO account and all hosts, code, and data, under the hood supports the identity.)
- nalgeon 2y agoCodapi works with mkdocs (and basically any other static generator). Here is the JS widget and integration guides: https://github.com/nalgeon/codapi-js https://github.com/nalgeon/codapi-js
- deleted 2y ago[deleted]