Guides listing
This commit is contained in:
@ -1,16 +1,6 @@
|
||||
[
|
||||
{
|
||||
"title": "WebStorm — Project History",
|
||||
"description": "Learn how to peek through the history of any git repository to learn how it grew.",
|
||||
"url": "/guides/project-history",
|
||||
"fileName": "project-history",
|
||||
"isPro": false,
|
||||
"author": "kamranahmedse",
|
||||
"updatedAt": "2020-07-16T19:59:14.191Z",
|
||||
"createdAt": "2020-07-16T19:59:14.191Z"
|
||||
},
|
||||
{
|
||||
"title": "CI and CD",
|
||||
"title": "What is CI and CD?",
|
||||
"description": "Learn the basics of CI/CD and how to implement that with GitHub Actions.",
|
||||
"url": "/guides/ci-cd",
|
||||
"fileName": "ci-cd",
|
||||
|
@ -16,7 +16,7 @@ export type GuideType = {
|
||||
formattedUpdatedAt: string;
|
||||
};
|
||||
|
||||
export function getAllGuides(limit: number = undefined): GuideType[] {
|
||||
export function getAllGuides(limit: number = 0): GuideType[] {
|
||||
return (guides as GuideType[])
|
||||
.filter(guide => !guide.isDraft)
|
||||
.sort((a, b) => (new Date(b.updatedAt) as any) - (new Date(a.updatedAt) as any))
|
||||
|
Reference in New Issue
Block a user