-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
-femit-docs: issues around private/public doc viewing #23858
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
to add to the above, other languages can create docs without compiling or running tests. for example this is some invalid Go code: package hello
func World() int {
return ""
} result:
but it will still produce docs:
|
what exactly is the problem statement of this issue? |
the viewing of Zig docs both privately and publicly is more difficult than it needs to be. privately the docs could be generated as static HTML files or similar, instead of having JS make network requests - if that was done you could avoid a local web server. if the WASM approach must remain, we could at least allow the remote WASM and TAR files to be used by fixing the CORS errors, which would result in a situation where you could avoid having to generate those files locally, and avoid having to host them on GitHub or anywhere else
this is helpful, but ideally we could generate docs without compiling, as in the example above. also I just realized that neither test example seem to work with multiple files
incorrect, Zig could produce docs that do not make a network request, then no web server is needed
the goal is improved experience with both private and public viewing of Zig docs, so yes the local experience is also important
it was just a personal example from my own experience, do you have data showing that Zig docs are more common than I am illustrating? |
related: #3028 |
following this:
https://zig.guide/build-system/generating-documentation
it seems you can create docs using one of these:
however
build-lib
creates extra files:and
build-obj
creates extra files:and
test
runs the tests, when I just want to create the documentation. moving on, we are left with this:the above has several issues. because the JS is making network requests:
zig/lib/docs/main.js
Lines 82 to 83 in c390671
you cannot just load the HTML into a browser:
you need to run a local file server. moving on, some of these already have a hosted version:
we can edit the JS, but errors are returned:
so we must host the source code for the entire Zig standard library. another issue is if we want to use GitHub for hosting the docs, we would have to put
main.wasm
andsources.tar
into version control, which is bad because they are both large binary files. I think the above points are creating a situation where not many people are hosting Zig docs. to give an example I was looking for a Zig ProtoBuf module, and came across these:none of which are hosting their own docs, on GitHub or otherwise.
The text was updated successfully, but these errors were encountered: