Browse Source

Case Sensivity Added

pull/18922/head
honurbu 2 years ago
parent
commit
fa0fb08711
  1. 13
      modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml.cs

13
modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml.cs

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
@ -117,9 +117,16 @@ namespace Volo.Docs.Pages.Documents.Project
{
return Redirect(decodedUrl);
}
var documentNameFallback = DocumentName ?? "";
var documentPath = DocumentName ?? "";
var documentNames = new[] { DocumentName, documentNameFallback.EnsureEndsWith('/') + "Index", documentNameFallback.EnsureEndsWith('/') + "index" };
string[] documentNames;
if (displayUrl.EndsWith("/index", StringComparison.OrdinalIgnoreCase))
{
documentPath = documentPath.Substring(0, documentPath.LastIndexOf('/') + 1);
}
documentNames = new[] { DocumentName, documentPath.EnsureEndsWith('/') + "Index", documentPath.EnsureEndsWith('/') + "index" };
foreach (var documentName in documentNames)
{

Loading…
Cancel
Save