You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
zzdoc is a 1:1 port of scdoc, designed for use in your build.zig file. It
will compile scdoc syntax into roff manpages. It will do so without requiring
scdoc to be installed on the host system. All scdoc tests have been ported
as well, ensuring zzdoc produces consistent output.
Usage
zzdoc exposes a generic manpage builder which accepts a std.io.AnyWriter and
std.io.AnyReader. This API allows zzdoc to be used with a wide variety of
inputs and outputs.
zzdoc also exposes build.zig helpers to make installation of manpages as
smooth as possible.
conststd=@import("std");
constzzdoc=@import("zzdoc");
pubfnbuild(b: *std.Build) void {
consttarget=b.standardTargetOptions(.{});
constoptimize=b.standardOptimizeOption(.{});
// All of our *.scd files live in ./docs/varman_step=zzdoc.addManpageStep(b, .{
.root_doc_dir=b.path("docs/"),
});
// Add an install step. This helper will install manpages to their// appropriate subdirectory under `.prefix/share/man`constinstall_step=man_step.addInstallStep(.{});
b.default_step.dependOn(&install_step.step);
}
License
zzdoc is MIT licensed, the same as scdoc. Many thanks to Drew DeVault for
developing scdoc.
About
an scdoc compatible manpage compiler for build.zig