ssg: StaticSiteClient: order and limit recent posts
This commit is contained in:
parent
0d84ae9927
commit
4623753bd8
|
@ -79,6 +79,8 @@ namespace OpenLiveWriter.BlogClient.Clients.StaticSite
|
||||||
catch { return null; }
|
catch { return null; }
|
||||||
})
|
})
|
||||||
.Where(post => post != null && (now == null || post.DatePublished < now))
|
.Where(post => post != null && (now == null || post.DatePublished < now))
|
||||||
|
.OrderByDescending(post => post.DatePublished)
|
||||||
|
.Take(maxPosts)
|
||||||
.ToArray();
|
.ToArray();
|
||||||
|
|
||||||
public string NewPost(string blogId, BlogPost post, INewCategoryContext newCategoryContext, bool publish, out string etag, out XmlDocument remotePost)
|
public string NewPost(string blogId, BlogPost post, INewCategoryContext newCategoryContext, bool publish, out string etag, out XmlDocument remotePost)
|
||||||
|
|
Loading…
Reference in New Issue