Originally created by @StefMa on GitHub (Jun 3, 2025).
Given my pkl-gha project.
I want to gernate the pkldocs for the current code.
For this, because the pkl-doc fat jar package fais with an exception, I use the Gradle plugin like the following:
Looking at the generated files, there is a slighly difference.
I observe the the "host" is missing in the local files version... 🤔
The first image displays the "lokal files" version, the second one the uri (remote) file version
I'm not sure if this is an bug in pkldoc or if I holding it wrong.
Maybe, for some strange reasions, this might be even the expected behavior 🤷
I appreciate any help here 🙂
Originally created by @StefMa on GitHub (Jun 3, 2025).
Given my [pkl-gha project](https://github.com/StefMa/pkl-gha/).
I want to gernate the pkldocs for the *current* code.
For this, because the `pkl-doc` fat jar package fais with an exception, I use the Gradle plugin like the following:
```kotlin
plugins {
id("org.pkl-lang") version "0.28.2"
}
val maybeVersion = "0.0.4"
pkl {
project {
packagers {
register("makePackages") {
if (maybeVersion != null) {
environmentVariables.put("VERSION", maybeVersion)
}
projectDirectories.from(file("."))
}
}
}
// ./gradlew pkldoc
if (maybeVersion != null) {
pkldocGenerators {
register("pkldoc") {
sourceModules =
files(
"doc-package-info.pkl",
"Workflow.pkl",
"Context.pkl",
)
}
}
}
}
```
The `doc-package-info.pkl` looks like this:
```pkl
/// Write GitHub Action Workflows with Pkl
amends "pkl:DocPackageInfo"
name = "com.github.action"
version = "0.0.4-SNAPSHOT"
importUri = "package://pkg.pkl-lang.org/github.com/stefma/pkl-gha/com.github.action@\(version)/"
issueTracker = "https://github.com/stefma/pkl-gha/issues"
sourceCode = "https://github.com/stefma/pkl-gha"
authors { "Stefan M. <StefMaDev@outlook.com>" }
```
The rest of the code is untouched from this tree:
https://github.com/StefMa/pkl-gha/tree/dd7b6049566130609ceb983dca059fed16c41f3d
If I runing `./gradlew pkldoc` and open the `build/pkldoc/pkldoc/index.html` I see a blank site:

However, the sub-package `com.github.action` exists:
http://localhost:63342/pkl-github/build/pkldoc/pkldoc/com.github.action/0.0.4-SNAPSHOT/index.html

If I change the `build.gradle` using my already published package:
```diff
sourceModules =
+ listOf(uri("package://pkg.pkl-lang.org/github.com/stefma/pkl-gha/com.github.action@$maybeVersion"))
- files(
- "doc-package-info.pkl",
- "Workflow.pkl",
- "Context.pkl",
- )
```
*then* the landing page is generated correctly 🫠

Looking at the generated files, there is a slighly difference.
I observe the the "host" is missing in the local files version... 🤔
The first image displays the "lokal files" version, the second one the `uri` (remote) file version

I'm not sure if this is an bug in pkldoc or if I holding it wrong.
Maybe, for some strange reasions, this might be even the expected behavior 🤷
I appreciate any help here 🙂
This is because versions with pre-release identifiers aren't indexed. They don't show up on the package index page, and they also don't show up in search.
Try publishing an initial version without a pre-release. That package will then show up on the index page. After that, you can publish a new version with a pre-release identifier, and that pre-release version will show up on the list of versions when you're browsing the package page.
By the way, SNAPSHOT is a maven-ism, and uncommon in semver. For semver, I'd recommend alpha, beta, etc.
@bioball commented on GitHub (Jun 3, 2025):
This is because versions with pre-release identifiers aren't indexed. They don't show up on the package index page, and they also don't show up in search.
Try publishing an initial version without a pre-release. That package will then show up on the index page. After that, you can publish a new version with a pre-release identifier, and that pre-release version will show up on the list of versions when you're browsing the package page.
By the way, `SNAPSHOT` is a maven-ism, and uncommon in semver. For semver, I'd recommend `alpha`, `beta`, etc.
Thanks for the answer. But... I am not sure if I understand it correctly. I do need to publish a version so that I can create the pkldoc for my current code? 🤔 I don't want to create the docs based on a public version. I want to create the docs based on the current "dev setup"... 🤔 Isn't this what we should do? 🤔
Is pkl more designed to create docs based on a published version?
Thanks for the semver hint! Will change that 🙃
@StefMa commented on GitHub (Jun 3, 2025):
Thanks for the answer. But... I am not sure if I understand it correctly. I do need to publish a version so that I can create the pkldoc for my **current code**? 🤔 I don't want to create the docs based on a public version. I want to create the docs based on the current "dev setup"... 🤔 Isn't this what we should do? 🤔
Is pkl more designed to create docs based on a published version?
Thanks for the semver hint! Will change that 🙃
Basically, try changing version 0.0.4-SNAPSHOT to 0.0.4, and you should see your package in the landing page.
@bioball commented on GitHub (Jun 3, 2025):
Basically, try changing version `0.0.4-SNAPSHOT` to `0.0.4`, and you should see your package in the landing page.
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 @StefMa on GitHub (Jun 3, 2025).
Given my pkl-gha project.
I want to gernate the pkldocs for the current code.
For this, because the
pkl-docfat jar package fais with an exception, I use the Gradle plugin like the following:The
doc-package-info.pkllooks like this:The rest of the code is untouched from this tree:
https://github.com/StefMa/pkl-gha/tree/dd7b6049566130609ceb983dca059fed16c41f3d
If I runing
./gradlew pkldocand open thebuild/pkldoc/pkldoc/index.htmlI see a blank site:However, the sub-package
com.github.actionexists:http://localhost:63342/pkl-github/build/pkldoc/pkldoc/com.github.action/0.0.4-SNAPSHOT/index.html
If I change the
build.gradleusing my already published package:then the landing page is generated correctly 🫠
Looking at the generated files, there is a slighly difference.
I observe the the "host" is missing in the local files version... 🤔
The first image displays the "lokal files" version, the second one the
uri(remote) file versionI'm not sure if this is an bug in pkldoc or if I holding it wrong.
Maybe, for some strange reasions, this might be even the expected behavior 🤷
I appreciate any help here 🙂
@bioball commented on GitHub (Jun 3, 2025):
This is because versions with pre-release identifiers aren't indexed. They don't show up on the package index page, and they also don't show up in search.
Try publishing an initial version without a pre-release. That package will then show up on the index page. After that, you can publish a new version with a pre-release identifier, and that pre-release version will show up on the list of versions when you're browsing the package page.
By the way,
SNAPSHOTis a maven-ism, and uncommon in semver. For semver, I'd recommendalpha,beta, etc.@StefMa commented on GitHub (Jun 3, 2025):
Thanks for the answer. But... I am not sure if I understand it correctly. I do need to publish a version so that I can create the pkldoc for my current code? 🤔 I don't want to create the docs based on a public version. I want to create the docs based on the current "dev setup"... 🤔 Isn't this what we should do? 🤔
Is pkl more designed to create docs based on a published version?
Thanks for the semver hint! Will change that 🙃
@bioball commented on GitHub (Jun 3, 2025):
Basically, try changing version
0.0.4-SNAPSHOTto0.0.4, and you should see your package in the landing page.@StefMa commented on GitHub (Jun 4, 2025):
🤦 Thanks. That indeed solves it.