-
Notifications
You must be signed in to change notification settings - Fork 275
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
Fix links to dependencies #524
base: main
Are you sure you want to change the base?
Conversation
This fixes an issue where package dependencies are not rendered correctly.
pageScope.relativeSiteUrl | ||
.resolve( | ||
"${localSitePackage.docPackageInfo.name.pathEncoded}/current/index.html" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will only show a local link if the package is known to Pkldoc, and it will link to "current" rather than the depended upon version. If the package is not known, and we don't know what its documentation URL is, this will just display plain text.
Note: I considered making this link directly to the version, e.g. "${localSitePackage.docPackageInfo.name.pathEncoded}/${localSitePackage.docPackageInfo.version.pathEncoded}/index.htm
However, we don't know if that version exists in the doc site. The page generator doesn't know about all the versions of each package, and we don't build this index until after the static HTML has been built.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No blockers; one possible smell
name = | ||
"${dependency.packageUri.uri.authority}${dependency.packageUri.uri.path.substringBeforeLast('@')}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has a bit of a smell to it. Is the definition of name
not adrift this way?
This actually introduces a new problem--links to modules of a package dependency is now broken. I'm going to hold off on this for now. |
This fixes an issue where package dependencies are not rendered correctly.
This also changes the names shown for these dependencies.
Before:
fruits
After:
localhost:0/fruits