zig.guide
zig.guide copied to clipboard
Generating documentation
I have skill issue - how to open generated docs in browser locally? https://zig.guide/build-system/generating-documentation/
// Docs
const docs_step = b.addInstallDirectory(.{
.source_dir = lib_unit_tests.getEmittedDocs(),
.install_dir = .prefix,
.install_subdir = "docs",
});
docs_step.step.dependOn(&exe.step);
const docs = b.step("docs", "Generate documentation");
docs.dependOn(&docs_step.step);
zig build docs generates docs in "zig-out/docs/" directory. To open it need to serve HTTP server by using i.e. Python: python -m http.server -d zig-out/docs &
Closed in e751f6c4bf215461a18382961cdd28057ddf3b3a