I don’t agree with that, I think using a dependency is the way to solve this.
Avoiding dependencies seems strange to me, similar to sticking with zig test ... or zig build-exe ... for way too long, instead of writing a build.zig, but maybe that is because I don’t understand the appeal in some specific workflow, why do you want to avoid dependencies?
This is something that works for autodocs:
This dependency from https://codeberg.org/andrewrk/player/src/branch/main/build.zig.zon seems to provide more general functionality, that isn’t just for serving autodocs:
GitHub - andrewrk/StaticHttpFileServer: Zig module for serving a directory of files from memory via HTTP · GitHub
I haven’t used it yet, but was planning to try to use it for a local development build step.