{"repo":"jillesvangurp/kotlin4example","free":true,"listed":false,"github":"https://github.com/jillesvangurp/kotlin4example","clone":"git clone https://github.com/jillesvangurp/kotlin4example.git","description":"Literate programming for Kotlin. Write markdown based documentation for your kotlin project with working examples.","language":"Kotlin","stars":22,"topics":["markdown","kotlin","literate-programming"],"license":"MIT","category":"productivity","readme_excerpt":"Kotlin4Example This project implements literate programming in Kotlin. Literate programming is useful for documenting projects. Having working code in your documentation, ensures that the examples you include are correct and always up to date. And making it easy to include examples with your code lowers the barrier for writing good documentation. This library is intended for anyone that publishes some kind of Kotlin library or code and wants to document their code using Markdown files that contain working examples. Write your documentation using a kotlin markdown DSL. Use simple example { // code goes here } blocks to provide examples. Kotlin4example will generate nice markdown with the code inside that block added as code blocks. See below for a detailed introduction. This README is of course generated with kotlin4example. Gradle Add the dependency to your project and start writing some documentation. See below for some examples. I tend to put my documentation code in my tests so running the tests produces the documentation as a side effect. You will also need to add the Jitpack repository: Getting Started After adding this library to your (test) dependencies, you can start adding code to generate markdown. Creating a SourceRepository The first thing you need is a SourceRepository definition. This is needed to tell kotlin4example about your repository, where to link, and where your code is. Some of the functions in kotlin4example construct links to files in your github repos","default_branch":null,"files":null,"tree":[],"storefront":"/r/jillesvangurp","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/jillesvangurp/kotlin4example/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}