Skip to content

Commit 68b410b

Browse files
handbook home page dynamic imports
Signed-off-by: Rajesh-Nagarajan-11 <rajeshnagarajan36@gmail.com>
1 parent 3f2b62e commit 68b410b

1 file changed

Lines changed: 30 additions & 95 deletions

File tree

src/sections/Community/Handbook/index.js

Lines changed: 30 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,32 @@
11
import React from "react";
2+
import { graphql, useStaticQuery } from "gatsby";
23
import { HandbookWrapper } from "./Handbook.style";
34
import HandbookCard from "../../../components/HandbookCard/index";
45
import AdventuresVol from "../../../components/AdventuresVol/index";
56
import vol1Img from "../Adventures-of-Five/vol1/meet-five.webp";
67

78
const handbookHome = () => {
9+
const data = useStaticQuery(graphql`
10+
query AllHandbookPages {
11+
allMdx(
12+
filter: { fields: { collection: { eq: "handbook" } } }
13+
sort: { frontmatter: { title: ASC } }
14+
) {
15+
nodes {
16+
frontmatter {
17+
title
18+
description
19+
}
20+
fields {
21+
slug
22+
}
23+
}
24+
}
25+
}
26+
`);
27+
28+
const handbookPages = data.allMdx.nodes;
29+
830
return (
931
<HandbookWrapper>
1032
<div className="page-header-section">
@@ -24,101 +46,14 @@ const handbookHome = () => {
2446
image={vol1Img}
2547
/>
2648

27-
<HandbookCard
28-
title="About"
29-
description="Layer5 offers cloud native application management by harnessing the power of a developer-friendly applications management system that supports visualization of the modern infrastructure leading to effective operation with best practices."
30-
to="/community/handbook/contributor-journey"
31-
/>
32-
33-
<HandbookCard
34-
title="Code of Conduct"
35-
description="At Layer5 We follow the CNCF Code of Conduct. We pledge to respect all people who contribute through reporting issues, to submit pull requests or patches, and other activities."
36-
to="/community/handbook/code-of-conduct"
37-
/>
38-
39-
<HandbookCard
40-
title="Community"
41-
description="A MeshMate is an experienced Layer5 community member, who will be available to guide you as you explore the various projects and find your areas of interest."
42-
to="/community/handbook/community"
43-
/>
44-
45-
<HandbookCard
46-
title="Connect with Us"
47-
description="We are a community of like-minded people with over a thousand members. Join our Slack Workspace and interact with people"
48-
to="/community/handbook/connect-with-us"
49-
/>
50-
51-
<HandbookCard
52-
title="Community Roles"
53-
description="Many roles exist in the community. Individuals who perform a role, bolster community and project growth by participating in decision-making and being accountable for those decisions."
54-
to="/community/handbook/community-roles"
55-
/>
56-
57-
<HandbookCard
58-
title="Contribution"
59-
description="Pull requests (PRs) are the best ways to propose changes to a project repository. At Layer5 org, we use the Github Flow."
60-
to="/community/handbook/contribution"
61-
/>
62-
63-
<HandbookCard
64-
title="Learning"
65-
description="As a community, we have put together good learning materials and resources to guide you through learning about cloud native infrastucture."
66-
to="/community/handbook/learn-layer5"
67-
/>
68-
69-
<HandbookCard
70-
title="Mentorship Programs"
71-
description="As an open-source organization and a community, we participate in different mentorships programs where project ideas are submitted for people to contribute to during the program."
72-
to="/community/handbook/mentorship-programs"
73-
/>
74-
75-
<HandbookCard
76-
title="Projects"
77-
description="Layer5 Projects: Layer5, Meshery, Kanvas, NightHawk"
78-
to="/community/handbook/projects"
79-
/>
80-
81-
<HandbookCard
82-
title="Recognition"
83-
description="Layer5 readily recognizes and publicly appreciates its community members."
84-
to="/community/handbook/recognition"
85-
/>
86-
87-
<HandbookCard
88-
title="Repository Overview"
89-
description="This overview serves as resources to newcomers seeking a perspective of the collective community efforts (from the limited vantage point of a code-centric perspective)."
90-
to="/community/handbook/repository-overview"
91-
/>
92-
93-
<HandbookCard
94-
title="Writing Program"
95-
description="The Layer5 Writing Program is a way to demonstrate your expertise, give back to the community, and help us produce great content."
96-
to="/community/handbook/writing-program"
97-
/>
98-
99-
<HandbookCard
100-
title="Security Vulnerabilities"
101-
description="We are very grateful to the security researchers and users that report back Meshery security vulnerabilities. We investigate every report thoroughly."
102-
to="/community/handbook/security-vulnerabilities"
103-
/>
104-
105-
<HandbookCard
106-
title="GitHub Process"
107-
description="The Layer5 GitHub Process emphasizes consistent pull requests and issue labels to streamline continuous integration and reduce overhead across their growing repository collection."
108-
to="/community/handbook/github-process"
109-
/>
110-
111-
<HandbookCard
112-
title="FAQs"
113-
description="General frequently asked questions (FAQ) about Layer5 and people who contribute through reporting issues, to submit pull requests or patches, and other activities."
114-
to="/community/handbook/faq"
115-
/>
116-
117-
<HandbookCard
118-
title="GitHub Organization Membership"
119-
description="Recognition of consistent contributors through GitHub organization invitations, outlining membership requirements, invitation process, and responsibilities."
120-
to="/community/handbook/instructions"
121-
/>
49+
{handbookPages.map((page, index) => (
50+
<HandbookCard
51+
key={index}
52+
title={page.frontmatter.title}
53+
description={page.frontmatter.description}
54+
to={page.fields.slug}
55+
/>
56+
))}
12257
</div>
12358
</HandbookWrapper>
12459
);

0 commit comments

Comments
 (0)