Yunus Emre Kalkan 6 years ago
parent ec5f2c4576
commit 06c4a5d022

@ -20,7 +20,7 @@ namespace VoloDocs.Web.Pages
//TODO: Create HomeController & Index instead of Page. Otherwise, we have an empty Index.cshtml file.
if (!_urlOptions.RoutePrefix.IsNullOrWhiteSpace())
{
return Redirect("./" + _urlOptions.GetFormattedRoutePrefix());
return Redirect("." + _urlOptions.GetFormattedRoutePrefix());
}
return Page();

@ -144,7 +144,7 @@ namespace Volo.Docs.Areas.Documents.TagHelpers
var prefix = _urlOptions.GetFormattedRoutePrefix();
return "/" + prefix + LanguageCode + "/" + ProjectName + "/" + Version + "/" + pathWithoutFileExtension;
return prefix + LanguageCode + "/" + ProjectName + "/" + Version + "/" + pathWithoutFileExtension;
}
private string RemoveFileExtensionFromPath(string path)

@ -13,10 +13,10 @@ namespace Volo.Docs
{
if (string.IsNullOrWhiteSpace(RoutePrefix))
{
return "";
return "/";
}
return RoutePrefix.Trim('/').EnsureEndsWith('/');
return RoutePrefix.EnsureEndsWith('/').EnsureStartsWith('/');
}
}
}

@ -23,7 +23,7 @@ namespace Volo.Docs.Markdown
_urlOptions = urlOptions.Value;
}
private const string MdLinkFormat = "[{0}](/{1}{2}/{3}/{4}{5}/{6})";
private const string MdLinkFormat = "[{0}]({1}{2}/{3}/{4}{5}/{6})";
private const string MarkdownLinkRegExp = @"\[(.*)\]\((.*\.md)\)";
private const string AnchorLinkRegExp = @"<a[^>]+href=\""(.*?)\""[^>]*>(.*)?</a>";

@ -33,7 +33,7 @@ namespace Volo.Docs.Pages.Documents
if (listResult.Items.Count == 1)
{
return Redirect("./" + DocumentsUrlPrefix + listResult.Items[0].ShortName);
return Redirect("." + DocumentsUrlPrefix + listResult.Items[0].ShortName);
}
Projects = listResult.Items;

@ -148,7 +148,7 @@ namespace Volo.Docs.Pages.Documents.Project
private IActionResult ReloadPageWithCulture()
{
var returnUrl = "/" + DocumentsUrlPrefix + LanguageCode + "/" + ProjectName + "/" + Version + "/" +
var returnUrl = DocumentsUrlPrefix + LanguageCode + "/" + ProjectName + "/" + Version + "/" +
DocumentName;
return Redirect("/Abp/Languages/Switch?culture=" + LanguageCode + "&uiCulture=" + LanguageCode + "&returnUrl=" + returnUrl);
@ -351,7 +351,7 @@ namespace Volo.Docs.Pages.Documents.Project
LanguageSelectListItems.Add(
new SelectListItem(
language.DisplayName,
"/" + DocumentsUrlPrefix + language.Code + "/" + Project.ShortName + "/" + Version + "/" + DocumentName,
DocumentsUrlPrefix + language.Code + "/" + Project.ShortName + "/" + Version + "/" + DocumentName,
language.Code == LanguageCode
)
);

Loading…
Cancel
Save