Skip to content

Commit e669938

Browse files
Merge pull request #7223 from Rajesh-Nagarajan-11/handbook-migration
Migrate Handbook Pages into MDX Collections
2 parents d46bfb7 + bba33a8 commit e669938

File tree

80 files changed

+2353
-4370
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+2353
-4370
lines changed

gatsby-node.js

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
6161
const envCreatePage = (props) => {
6262
if (process.env.CI === "true") {
6363
const { path, matchPath, ...rest } = props;
64-
64+
const isHandbookPage = path.startsWith("/community/handbook/");
6565
createRedirect({
6666
fromPath: `/${path}/`,
6767
toPath: `/${path}`,
@@ -70,7 +70,7 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
7070
});
7171

7272
return createPage({
73-
path: `${path}.html`,
73+
path: isHandbookPage ? path : `${path}.html`,
7474
matchPath: matchPath || path,
7575
...rest,
7676
});
@@ -137,6 +137,9 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
137137
`
138138
: "";
139139

140+
const HandbookTemplate = path.resolve("src/templates/handbook-template.js");
141+
142+
140143
const res = await graphql(`
141144
{
142145
allPosts: allMdx(filter: { frontmatter: { published: { eq: true } } }) {
@@ -154,6 +157,19 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
154157
}
155158
}
156159
}
160+
handbookPages: allMdx(
161+
filter: { fields: { collection: { eq: "handbook" } } }
162+
) {
163+
nodes {
164+
fields {
165+
slug
166+
collection
167+
}
168+
internal {
169+
contentFilePath
170+
}
171+
}
172+
}
157173
blogTags: allMdx(
158174
filter: {
159175
fields: { collection: { eq: "blog" } }
@@ -253,6 +269,9 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
253269
const members = filterByCollection("members");
254270
const integrations = filterByCollection("integrations");
255271

272+
const handbook = res.data.handbookPages.nodes;
273+
274+
256275
const singleWorkshop = res.data.singleWorkshop.nodes;
257276
const labs = res.data.labs.nodes;
258277

@@ -414,6 +433,17 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
414433
});
415434
}
416435

436+
handbook.forEach((page) => {
437+
envCreatePage({
438+
path: page.fields.slug,
439+
component: `${HandbookTemplate}?__contentFilePath=${page.internal.contentFilePath}`,
440+
context: {
441+
slug: page.fields.slug,
442+
},
443+
});
444+
});
445+
446+
417447
programs.forEach((program) => {
418448
envCreatePage({
419449
path: `/programs/${program.frontmatter.programSlug}`,
@@ -670,6 +700,9 @@ exports.onCreateNode = ({ node, actions, getNode }) => {
670700
if (node.frontmatter.published)
671701
slug = `/community/members/${node.frontmatter.permalink ?? slugify(node.frontmatter.name)}`;
672702
break;
703+
case "handbook":
704+
slug = `/community/handbook/${slugify(node.frontmatter.title)}`;
705+
break;
673706
case "events":
674707
if (node.frontmatter.title)
675708
slug = `/community/events/${slugify(node.frontmatter.title)}`;
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
---
2+
title: "About"
3+
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."
4+
type: Handbook
5+
contents:
6+
- id: 0
7+
link: "#About Layer5"
8+
text: "About Layer5"
9+
- id: 1
10+
link: "#Goals"
11+
text: "Goals"
12+
- id: 2
13+
link: "#Newcomer's Path"
14+
text: "Newcomer's Path"
15+
- id: 3
16+
link: "#Working on your issue"
17+
text: "Working on your issue"
18+
- id: 4
19+
link: "#While your issue is under review"
20+
text: "While your issue is under review"
21+
---
22+
23+
import { Container, Row, Col } from "../../../reusecore/Layout";
24+
import NewcomersMap from "../../../sections/Community/Newcomers-guide/newcomers-map";
25+
import longArrow from "../../../sections/Community/Newcomers-guide/long-arrow.svg";
26+
import { useState } from "react";
27+
28+
29+
export const JourneySection = () => {
30+
const [hover, setHover] = useState(false);
31+
return (
32+
<Row className="newcomers-journey">
33+
<Col
34+
className="heading"
35+
$sm={12}
36+
$lg={6}
37+
onMouseOver={() => setHover(true)}
38+
onMouseOut={() => setHover(false)}
39+
>
40+
<h2>Contributor's Journey</h2>
41+
<div className="heading-start">
42+
<h5>Start Here</h5>
43+
<img className="heading-start__arrow" src={longArrow} alt="longArrow" />
44+
</div>
45+
</Col>
46+
<Col $sm={12} $lg={6}>
47+
<NewcomersMap handleMouseHover={hover} />
48+
</Col>
49+
</Row>
50+
);
51+
};
52+
53+
<a id="About Layer5">
54+
<h2>About Layer5</h2>
55+
</a>
56+
57+
At Layer5, we champion developer-defined infrastructure, giving engineers the power to reshape application delivery. We empower operators in reimagining how they manage modern infrastructure: collaboratively.
58+
<br />
59+
Layer5 is not just a company, we are also:
60+
61+
#### Community First
62+
63+
The Layer5 community builds projects to provide learning environments, deployment, and operational best practices, performance benchmarks, create documentation, share networking opportunities, and more. Our shared commitment to the open-source spirit pushes Layer5 projects forward. New members are always welcome.
64+
65+
#### Open Source First
66+
67+
All Layer5 projects are open-source. Anyone can download, use, work on, and share it with others. It's built on principles like collaboration, globalism, and innovation. Layer5 projects are distributed under the terms of <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache v2</a>.
68+
69+
<a id="Goals">
70+
<h2>Goals</h2>
71+
</a>
72+
73+
- To build a large collection of cloud native technologies.
74+
- To build products that are accessible and easy to use.
75+
- To build a welcoming community for open-source contributions.
76+
77+
<a id="Newcomer's Path">
78+
<h2>Newcomer's Path</h2>
79+
</a>
80+
81+
Thank you for your interest in contributing to Layer5 open source initiatives!
82+
83+
<JourneySection />
84+
85+
In combination with the Layer5 Community Guide and Contributing Guide, the following set of instructions are to encourage and support first-time (or near first-time) open-source contributors.
86+
87+
<a id="How to contribute?">
88+
<h3>How to contribute?</h3>
89+
</a>
90+
91+
The following steps outline the process by which you can openly engage, learn, and participate in the broad set of open source projects at Layer5.
92+
93+
1. Browse the list of <a href="https://github.com/layer5io">Layer5</a> org issues bearing the <a href="https://github.com/search?q=is%3Aopen+is%3Aissue+archived%3Afalse+org%3Alayer5io+label%3A%22good+first+issue%22+no%3Aassignee">"good first issue"</a>, <a href="https://github.com/search?q=is%3Aopen+is%3Aissue+archived%3Afalse+org%3Alayer5io+label%3A%22first+timers+only%22+no%3Aassignee">"first-timers-only"</a> or the <a href="https://github.com/search?q=is%3Aopen+is%3Aissue+archived%3Afalse+org%3Alayer5io+label%3A%22help+wanted%22+no%3A%22assignee%22">"help wanted"</a> label.
94+
95+
2. Alternatively, find an area of interest by checking out the Layer5 Repository Overview section of this handbook.
96+
97+
3. After identifying the issue you wish to work on, check if it has been assigned by taking a look at the assignee section on the issue, otherwise signal your interest by commenting on the issue so that it can be assigned to you.
98+
99+
<a id="Working on your issue">
100+
<h3>Working on your issue</h3>
101+
</a>
102+
103+
Once an issue has been assigned to you, it's time to get started!
104+
105+
1. Be sure to <a href="https://github.com/layer5io/meshery/blob/master/CONTRIBUTING.md#signing-off-on-commits-developer-certificate-of-origin">sign off on your commits</a>
106+
107+
2. Contributions of all sizes are welcome.
108+
109+
3. If you need some additional help, please join the Layer5 Slack workspace and find your way to the #newcomers channel. Feel free to ask questions.
110+
111+
<a id="While your issue is under review">
112+
<h3>While your issue is under review</h3>
113+
</a>
114+
115+
1. Please double-check that you have signed off on all of your git commits.
116+
117+
2. Be patient. There are a large number of contributors and only a small number of maintainers/reviewers. All contributors are equally important to us, and we'll be sure to get to you as soon as possible. In the meanwhile, you are welcome to join our Slack workspace and take a look at all our projects.
118+
File renamed without changes.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
title: "Code of Conduct"
3+
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."
4+
type: Handbook
5+
---
6+
7+
import Point from "./bullet.svg";
8+
9+
<h2 className="heading-top">Community Code of Conduct</h2>
10+
11+
Layer5 follows the <a href="https://github.com/cncf/foundation/blob/master/code-of-conduct.md">CNCF Code of Conduct</a> which states that:
12+
13+
As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, to post feature requests, to update documentation, to submit pull requests or patches, and other activities.
14+
15+
We are committed to participating in this project as a harassment-free experience for everyone, regardless of the level of experience, gender, gender identity, and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality.
16+
17+
Examples of unacceptable behavior by participants include:
18+
19+
<p><img className="logo" src={Point} alt="Point" />The use of sexualized language or imagery</p>
20+
<p><img className="logo" src={Point} alt="Point" />Personal attacks</p>
21+
<p><img className="logo" src={Point} alt="Point" />Trolling or insulting/derogatory comments</p>
22+
<p><img className="logo" src={Point} alt="Point" />Public or private harassment</p>
23+
<p><img className="logo" src={Point} alt="Point" />Publishing other's private information, such as physical or electronic addresses, without explicit permission</p>
24+
<p><img className="logo" src={Point} alt="Point" />Other unethical or unprofessional conduct</p>
25+
26+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team.
27+
28+
This code of conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.
29+
30+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting <a href="http://[email protected].">[email protected].</a>
31+

0 commit comments

Comments
 (0)