tvl-depot/users/sterni/htmlman/README.md
sterni 2cd2b58a04 feat(users/sterni/htmlman): static site generator for manual pages
htmlman is a very simple nix based static site generator which is
intended for rendering HTML representations for man pages plus an index
page listing all available pages. For the sake of simplicity (and unlike
previous iterations of this piece of code) other documentation artifacts
and formats are not supported.

Usually web services like GitHub and depot's web interface are pretty
good at displaying "normal" documentation artifacts like markdown files,
but man pages are usually not rendered — with the additional problem
that it's source is virtually unreadable. htmlman should provide a
simple static site generator which can be plugged into GitHub actions or
the like to automatically generate rendered version of man pages tracked
in version control.

Change-Id: Ib53292964b3ff84c32d70c5fde257a2edb8c2122
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2596
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
Reviewed-by: Profpatsch <mail@profpatsch.de>
Reviewed-by: sterni <sternenseemann@systemli.org>
2021-03-11 13:12:31 +00:00

620 B

htmlman

static site generator for man pages intended for rendering man page documentation viewable using a web browser.

usage

If you have a nix expression, doc.nix, like this:

{ depot, ... }:

depot.users.sterni.htmlman {
  title = "foo project";
  pages = [
    {
      name = "foo";
      section = 1;
    }
    {
      name = "foo";
      section = 3;
      path = ../devman/foo.3;
    }
  ];
  manDir = ../man;
}

You can run the following to directly deploy the resulting documentation output to a specific target directory:

nix-build -A deploy doc.nix && ./result target_directory