dsabsay / lazylit

Publish ad hoc explanations of code, tied to a specific revision/commit.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

lazylit

Publish an ad hoc explanation of code, tied to a single revision/commit, and link to that explanation from anywhere.

lazylit is a code documentation tool that generates static HTML that can be published via e.g. GitHub Pages and linked from anywhere (code comments, READMEs, Jira tickets, etc.).

See an example of the final output.

The main idea is that you can write extensive explanations of particularly confusing code, tying your explanation to a specific revision (i.e. commit) of a given source code file. You can link to this explanation from anywhere you like. The rendered web page makes it clear which version of the source code you are referring to so there is no expectation that the explanation be kept up-to-date. And yet it may still help out your fellow colleagues as they navigate a complex codebase :)

I see this being particularly helpful for documenting project- and team-specific conventions and patterns. See here for a more complete motivation.

Install

For macOS:

brew tap dsabsay/homebrew-tap
brew install lazylit

Usage

Create a new repository in GitHub. Configure it to serve static content from the docs/ directory.

Create a directory artifacts/.

Copy a source code file you'd like to document into a subdirectory of artifacts/.

mkdir artifacts/crazy_makefile
cp <your crazy makefile> artifacts/crazy_makefile/crazy_makefile.jul_18_2020

Add your documentation as comments to the file under artifacts/. Make sure you add the necessary headers.

lazylit
git add .
git commit -m 'new docs'
git push

See the lazylit-example repo to see what your repo should look like.

About

Publish ad hoc explanations of code, tied to a specific revision/commit.

License:MIT License


Languages

Language:HTML 51.9%Language:Go 33.4%Language:Python 10.6%Language:CSS 3.8%Language:Makefile 0.2%