# Browseable Zig standard library 2

This is a little Ruby program that creates a browseable HTML mini-site from
the Zig standard library source.

<img src="raw/zig-stdlib-book.svg" alt="" style="float: right; margin: 1em;">

The style was inspired by (as in, nearly identical to)
<a href="https://web.archive.org/web/20120428101624/http://jashkenas.github.com/docco/">docco.coffee</a> (archive.org).

To make it browseable, `@import()` calls get converted to hyperlinks.

<a href="http://ratfactor.com/zig/stdlib-browseable2/">See it live here!</a>


## Run it!

The Ruby program generates a page for one Zig file at a time.

There's a Bash script to make the whole site.

The first parameter of the script must be a path to a Zig Std Lib (ending in trailing slash `/`):

    ./build.sh /home/dave/zig/lib/std/

The second parameter _can_ be a wildcard match of files/directories to generate:

    ./build.sh /home/dave/zig/lib/std/ queue
    atomic/queue.zig
    priority_queue.zig
    priority_dequeue.zig

Output will be generated in a new directory named `output/` in the current
working directory.

## TODOs

* I don't need Bash here. Ruby can do all of this. I was just re-using script.
* Make an index page with big "browse" link at top followed by semi-automated, categorized file tree
