Skip to content

Commit 5ff3173

Browse files
committed
force order of docs
1 parent 16861c9 commit 5ff3173

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

MyApp/Markdown.Pages.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ public class MarkdownPages : MarkdownPagesBase<MarkdownFileInfo>
1414
public MarkdownPages(ILogger<MarkdownPages> log, IWebHostEnvironment env) : base(log,env) {}
1515
List<MarkdownFileInfo> Pages { get; set; } = new();
1616
public List<MarkdownFileInfo> GetVisiblePages(string? prefix=null, bool allDirectories=false) => prefix == null
17-
? Pages.Where(x => IsVisible(x) && !x.Slug!.Contains('/')).OrderBy(x => x.Order).ToList()
17+
? Pages.Where(x => IsVisible(x) && !x.Slug!.Contains('/')).OrderBy(x => x.Order).ThenBy(x => x.Path).ToList()
1818
: Pages.Where(x => IsVisible(x) && x.Slug!.StartsWith(prefix.WithTrailingSlash()))
1919
.Where(x => allDirectories || (x.Slug.CountOccurrencesOf('/') == prefix.CountOccurrencesOf('/') + 1))
20-
.OrderBy(x => x.Order).ToList();
20+
.OrderBy(x => x.Order).ThenBy(x => x.Path).ToList();
2121

2222
public MarkdownFileInfo? GetBySlug(string slug)
2323
{

MyApp/appsettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
"AllowedHosts": "*",
99
"AppConfig": {
1010
"LocalBaseUrl": "https://localhost:5002",
11-
"PublicBaseUrl": "https://razor-ssg.web-templates.io"
11+
"PublicBaseUrl": "https://docs2.servicestack.net"
1212
}
1313
}

0 commit comments

Comments
 (0)