Fix bug in dev environments
This commit is contained in:
parent
c67aa37590
commit
43355f4377
|
@ -15,7 +15,8 @@ public class BlogModel : PageModel {
|
||||||
|
|
||||||
static BlogModel() {
|
static BlogModel() {
|
||||||
foreach (var file in Directory.EnumerateFiles("Pages/blog/posts"))
|
foreach (var file in Directory.EnumerateFiles("Pages/blog/posts"))
|
||||||
Posts.Add(new BlogPost(Path.GetFileNameWithoutExtension(file)));
|
if (file.EndsWith(".md"))
|
||||||
|
Posts.Add(new BlogPost(Path.GetFileNameWithoutExtension(file)));
|
||||||
|
|
||||||
Posts = Posts.OrderByDescending(p => p.PublishedOn).ToList();
|
Posts = Posts.OrderByDescending(p => p.PublishedOn).ToList();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue