mirror of
https://github.com/apple/pkl.git
synced 2026-05-25 16:19:20 +02:00
pkl-doc: Support single-package docsite mode (#1592)
When a docsite has only one package name and no DocsiteInfo.overview, treat it like Javadoc's single-module output: redirect the top-level index to the package page and omit the site-title breadcrumb segment from generated pages. Add src/test/files/SinglePackageTest fixtures to cover multiple package versions, redirect behavior, breadcrumb behavior, and unchanged site structure. Also: - Shut down Executor used in test. - Declare expected output fixtures of DocGenerator as test inputs, not outputs. - Fix IntelliJ warning by using a Set for the right-hand side of collection subtraction.
This commit is contained in:
+1
@@ -0,0 +1 @@
|
||||
{"ref":{"pkg":"com.package1","pkgUri":null,"version":"4.5.6"},"summary":"Additional version fixture for single-package site tests.","sourceCode":"https://example.com/package1/","sourceCodeUrlScheme":"https://example.com/package1%{path}#L%{line}-L%{endLine}","dependencies":[{"ref":{"pkg":"pkl","pkgUri":null,"version":"0.24.0"}}],"modules":[{"ref":{"pkg":"com.package1","pkgUri":null,"version":"4.5.6","module":"minimal"},"summary":"Additional version module fixture.","moduleClass":{"ref":{"pkg":"com.package1","pkgUri":null,"version":"4.5.6","module":"minimal","type":"ModuleClass"},"superclasses":[{"pkg":"pkl","pkgUri":null,"version":"0.24.0","module":"base","type":"Module"},{"pkg":"pkl","pkgUri":null,"version":"0.24.0","module":"base","type":"Typed"},{"pkg":"pkl","pkgUri":null,"version":"0.24.0","module":"base","type":"Object"},{"pkg":"pkl","pkgUri":null,"version":"0.24.0","module":"base","type":"Any"}]},"classes":[{"ref":{"pkg":"com.package1","pkgUri":null,"version":"4.5.6","module":"minimal","type":"Person"},"superclasses":[{"pkg":"pkl","pkgUri":null,"version":"0.24.0","module":"base","type":"Typed"},{"pkg":"pkl","pkgUri":null,"version":"0.24.0","module":"base","type":"Object"},{"pkg":"pkl","pkgUri":null,"version":"0.24.0","module":"base","type":"Any"}]}]}]}
|
||||
Reference in New Issue
Block a user