diff options
author | sterni <sternenseemann@systemli.org> | 2021-03-10T14·37+0100 |
---|---|---|
committer | sterni <sternenseemann@systemli.org> | 2021-03-11T13·12+0000 |
commit | 2cd2b58a04cd86e8bf1d72e9c0a67ad8c8e9c8dd (patch) | |
tree | 3f31e27a700d93ec79bd2e130dc98ebc1eda024e /users/sterni/htmlman/README.md | |
parent | e41bd6a82de9f9cba1783fc26bb71b4c97b1953a (diff) |
feat(users/sterni/htmlman): static site generator for manual pages r/2276
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>
Diffstat (limited to 'users/sterni/htmlman/README.md')
-rw-r--r-- | users/sterni/htmlman/README.md | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/users/sterni/htmlman/README.md b/users/sterni/htmlman/README.md new file mode 100644 index 000000000000..258233d4c4d2 --- /dev/null +++ b/users/sterni/htmlman/README.md @@ -0,0 +1,36 @@ +# 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: + +```nix +{ 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: + +```sh +nix-build -A deploy doc.nix && ./result target_directory +``` |