internal/frontend: fix links for subdirectories
Links in the subdirectories section are now generated using linkVersion,
which fixes links for the stdlib.
Change-Id: I4dae002f604ff2bb47fbb8d6ae374516bada1804
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/260037
Trust: Julie Qiu <julie@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
diff --git a/internal/frontend/unit.go b/internal/frontend/unit.go
index ae6e87e..0b0f797 100644
--- a/internal/frontend/unit.go
+++ b/internal/frontend/unit.go
@@ -391,7 +391,7 @@
continue
}
sdirs = append(sdirs, &Subdirectory{
- URL: constructPackageURL(pm.Path, um.ModulePath, um.Version),
+ URL: constructPackageURL(pm.Path, um.ModulePath, linkVersion(um.Version, um.ModulePath)),
Suffix: internal.Suffix(pm.Path, um.Path),
Synopsis: pm.Synopsis,
})