Originally created by @sin-ack on GitHub (Oct 1, 2025).
I'm trying to use pkl-doc to generate documentation from a local branch I have of pkl, but when trying to point pkl-doc at stdlib/, I get:
» pkl-doc/build/executable/pkldoc-linux-amd64 stdlib/*.pkl --output-dir stdlib-docs
–– Pkl Error ––
External members can only be defined by standard library modules.
175 | external function run(): BenchmarkResult
^^^^^^^^
at pkl.Benchmark#Microbenchmark (file:///home/agni/repos/third-party/pkl/stdlib/Benchmark.pkl, line 175)
How can I generate a local copy of the stdlib docs? DEVELOPMENT.adoc doesn't mention it either.
Originally created by @sin-ack on GitHub (Oct 1, 2025).
I'm trying to use `pkl-doc` to generate documentation from a local branch I have of pkl, but when trying to point `pkl-doc` at `stdlib/`, I get:
```
» pkl-doc/build/executable/pkldoc-linux-amd64 stdlib/*.pkl --output-dir stdlib-docs
–– Pkl Error ––
External members can only be defined by standard library modules.
175 | external function run(): BenchmarkResult
^^^^^^^^
at pkl.Benchmark#Microbenchmark (file:///home/agni/repos/third-party/pkl/stdlib/Benchmark.pkl, line 175)
```
How can I generate a local copy of the stdlib docs? `DEVELOPMENT.adoc` doesn't mention it either.
You need to use the lower-level API to do this; i.e. call into org.pkl.doc.DocGenerator with the standard library as one of the packages arguments. You'd collect the schemas with the Pkl evaluator's evaluateSchema method, passing in each of the stdlib modules.
@bioball commented on GitHub (Oct 17, 2025):
You need to use the lower-level API to do this; i.e. call into `org.pkl.doc.DocGenerator` with the standard library as one of the `packages` arguments. You'd collect the schemas with the Pkl evaluator's `evaluateSchema` method, passing in each of the stdlib modules.
But: the stdlib documentation already exists here: https://pkl-lang.org/package-docs/pkl/current/index.html. Why are you looking to generate docs for the stdlib?
The package-docs currently doesn't contain documentation built regularly from main, and we're currently internally using a branch on top of main (binary parser/renderer + some Pkldoc fixes) which makes Pkldoc output links to "0.30.0-dev". I wanted to include stdlib documentation in our internal docs site as well to make cross-links to stdlib types work.
@sin-ack commented on GitHub (Oct 19, 2025):
The package-docs currently doesn't contain documentation built regularly from `main`, and we're currently internally using a branch on top of `main` (binary parser/renderer + some Pkldoc fixes) which makes Pkldoc output links to "0.30.0-dev". I wanted to include stdlib documentation in our internal docs site as well to make cross-links to stdlib types work.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @sin-ack on GitHub (Oct 1, 2025).
I'm trying to use
pkl-docto generate documentation from a local branch I have of pkl, but when trying to pointpkl-docatstdlib/, I get:How can I generate a local copy of the stdlib docs?
DEVELOPMENT.adocdoesn't mention it either.@bioball commented on GitHub (Oct 17, 2025):
You need to use the lower-level API to do this; i.e. call into
org.pkl.doc.DocGeneratorwith the standard library as one of thepackagesarguments. You'd collect the schemas with the Pkl evaluator'sevaluateSchemamethod, passing in each of the stdlib modules.But: the stdlib documentation already exists here: https://pkl-lang.org/package-docs/pkl/current/index.html. Why are you looking to generate docs for the stdlib?
@sin-ack commented on GitHub (Oct 19, 2025):
The package-docs currently doesn't contain documentation built regularly from
main, and we're currently internally using a branch on top ofmain(binary parser/renderer + some Pkldoc fixes) which makes Pkldoc output links to "0.30.0-dev". I wanted to include stdlib documentation in our internal docs site as well to make cross-links to stdlib types work.