diff --git a/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml.cs b/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml.cs index dd8ba6bc9c..b10d741fb2 100644 --- a/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml.cs +++ b/modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml.cs @@ -309,7 +309,14 @@ namespace Volo.Docs.Pages.Documents.Project if (Project.ExtraProperties.ContainsKey("GithubVersionProviderSource") && (GithubVersionProviderSource) (long) Project.ExtraProperties["GithubVersionProviderSource"] == GithubVersionProviderSource.Branches) { - var latest = versions.FirstOrDefault(v=> v.Version == Project.LatestVersionBranchName); + var prefix = Project.ExtraProperties["VersionBranchPrefix"].ToString(); + var LatestVersionBranchNameWithoutPrefix = + !string.IsNullOrWhiteSpace(Project.LatestVersionBranchName) && + Project.LatestVersionBranchName.StartsWith(prefix) && Project.LatestVersionBranchName.Length > prefix.Length + ? Project.LatestVersionBranchName.Substring(prefix.Length) + : Project.LatestVersionBranchName; + + var latest = versions.FirstOrDefault(v=> v.Version == LatestVersionBranchNameWithoutPrefix); if (latest != null) {