Skip to content

Commit dc00f19

Browse files
author
John P Vajda
committed
added contributor, guides and code of conduct
1 parent 90a5616 commit dc00f19

File tree

4 files changed

+829
-17
lines changed

4 files changed

+829
-17
lines changed

CODE_OF_CONDUCT.md

+44-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,46 @@
1-
### Hello! We're glad you've joined us.
1+
# Contributor Covenant Code of Conduct
22

3-
We believe participation in our community should be a harassment free experience for everyone.
3+
## Our Pledge
44

5-
Learn more about our guidelines and principles by reading our [Code of Conduct](https://opensource.newrelic.com/code-of-conduct/) on our Open Source Website.
5+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6+
7+
## Our Standards
8+
9+
Examples of behavior that contributes to creating a positive environment include:
10+
11+
- Using welcoming and inclusive language
12+
- Being respectful of differing viewpoints and experiences
13+
- Gracefully accepting constructive criticism
14+
- Focusing on what is best for the community
15+
- Showing empathy towards other community members
16+
17+
Examples of unacceptable behavior by participants include:
18+
19+
- The use of sexualized language or imagery and unwelcome sexual attention or advances
20+
- Trolling, insulting/derogatory comments, and personal or political attacks
21+
- Public or private harassment
22+
- Publishing others' private information, such as a physical or electronic address, without explicit permission
23+
- Other conduct which could reasonably be considered inappropriate in a professional setting
24+
25+
## Our Responsibilities
26+
27+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28+
29+
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, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30+
31+
## Scope
32+
33+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34+
35+
## Enforcement
36+
37+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38+
39+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40+
41+
## Attribution
42+
43+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44+
45+
[homepage]: http://contributor-covenant.org
46+
[version]: http://contributor-covenant.org/version/1/4/

COMPONENT_GUIDE.md

+276
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,276 @@
1+
- [Globally available components](#globally-available-components)
2+
- [Video](#video)
3+
- [Usage](#usage)
4+
- [Intro](#intro)
5+
- [Usage](#usage-1)
6+
- [Steps](#steps)
7+
- [Usage](#usage-2)
8+
- [Step](#step)
9+
- [Usage](#usage-3)
10+
- [A code example](#a-code-example)
11+
- [Another code example](#another-code-example)
12+
- [Code blocks](#code-blocks)
13+
- [Usage](#usage-4)
14+
- [Callouts](#callouts)
15+
- [Usage](#usage-5)
16+
- [Announcement Banner](#announcement-banner)
17+
18+
# Globally available components
19+
20+
## Video
21+
22+
`<Video />` component provides formatting for videos in markdown.
23+
24+
### Usage
25+
26+
The Video component requires two props:
27+
28+
- `id`: the video ID
29+
- `type`: the host of the video. Accepted values are:
30+
- `wistia`
31+
- `youtube`
32+
33+
```md
34+
<Video id="zxunt1u1as" type="wistia"/>
35+
```
36+
37+
## Intro
38+
39+
The `<Intro />` component provides formatting for the title and introduction of the markdown document.
40+
41+
### Usage
42+
43+
It takes the title provided in the Frontmatter and accepts plain text for the description. An example of Frontmatter that will have a title of **Example Guide**:
44+
45+
```
46+
---
47+
path: '/example'
48+
duration: '30 min'
49+
title: 'Example Guide'
50+
template: 'GuideTemplate'
51+
description: 'Example guide page'
52+
---
53+
```
54+
55+
It also accepts a `<Video />` component as a child, which it will place on the left side of the description.
56+
57+
```md
58+
<Intro>
59+
This is a description for the markdown guide.
60+
61+
<Video id="zxunt1u1as" type="youtube"/>
62+
</Intro>
63+
```
64+
65+
If there is a more than plain text and a `<Video />` (such as a code snippet or another component) the content will be posted on the left side below the description.
66+
67+
## Steps
68+
69+
The `<Steps />` is a required container for the individual `<Step />` components and will autonumber from top to bottom.
70+
71+
### Usage
72+
73+
The Steps component accepts `<Step/>` components as its children and will increment by the number of child components.
74+
75+
```md
76+
<Steps>
77+
78+
<Step>
79+
80+
## Step 1
81+
82+
Step 1 description.
83+
</Step>
84+
85+
<Step>
86+
87+
## Step 2
88+
89+
Step 2 description
90+
</Step>
91+
92+
</Steps>
93+
```
94+
95+
If there is markdown content not wrapped by a `<Step />` component, it will still auto-increment for that content, so be sure to wrap all content with the Step component. For example:
96+
97+
```md
98+
<Steps>
99+
100+
<Step>
101+
This will read as Step 1 of 3.
102+
</Step>
103+
104+
This will display as is with no step counter.
105+
106+
<Step>
107+
This will read as Step 3 of 3.
108+
</Step>
109+
110+
</Steps>
111+
```
112+
113+
## Step
114+
115+
### Usage
116+
117+
The `<Step />` component renders a single step in the series of steps. This is
118+
meant to use in conjunction with `<Steps />`, so this component **MUST** be
119+
wrapped by `<Steps />` to work properly. The following example will contain 2
120+
steps:
121+
122+
```md
123+
<Steps>
124+
<Step>Some information about step 1</Step>
125+
<Step>Some information about step 2</Step>
126+
</Steps>
127+
```
128+
129+
The previous example will interpret the text inside of the `<Step />` as plain
130+
text. If you would like the `<Step />` component to interpret the text as
131+
markdown content, include a line break after the opening tag:
132+
133+
```md
134+
<Step>
135+
136+
# This is a title for the step.
137+
138+
This is some information about this step.
139+
</Step>
140+
```
141+
142+
You can intersperse code blocks inside of the step. Code snippets will always
143+
render in a right column next to the description.
144+
145+
````md
146+
<Step>
147+
148+
# A code example
149+
150+
Run the following command in your terminal:
151+
152+
```shell
153+
npm start
154+
```
155+
156+
</Step>
157+
````
158+
159+
You can include multiple code blocks in a single step. Code blocks will always
160+
be rendered to the right of the text that precedes it.
161+
162+
````md
163+
<Step>
164+
165+
# Another code example
166+
167+
Run the following in your terminal:
168+
169+
```shell
170+
npm start
171+
```
172+
173+
When that is running, edit index.js and replace the component with the following
174+
code:
175+
176+
```js
177+
return <div>Hello, {props.name}</div>;
178+
```
179+
180+
</Step>
181+
````
182+
183+
You can also use images in steps. To get an image to appear on the right side as with code blocks, you must use an HTML `img` tag, traditional markdown will not align the image to the right.
184+
185+
```md
186+
<Step>
187+
188+
# Image example
189+
190+
A step description
191+
<img src="../images/folder/great-img.png" alt="and here's an image to follow">
192+
193+
</Step>
194+
```
195+
196+
> Note: keep in mind that a new line is necesary after an `img` tag to ensure proper rendering of subsequent text/markdown.
197+
198+
## Code blocks
199+
200+
Code blocks are automatically formatted by three backticks. This is our preferred method to delineate code snippets, but it's worth noting that markdown will also consider any text that is indented 4 spaces (or 1 tab) to be a code block.
201+
202+
### Usage
203+
204+
There are four props that can be supplied to a code snippet.
205+
206+
- `language`: The first prop must be a code language. [Here](https://prismjs.com/#supported-languages) is a list of accepted languages for syntax highlighting.
207+
208+
````md
209+
```jsx
210+
```
211+
````
212+
213+
- `lineNumbers`: `true` or `false`. Will show line numbers of the left side of the code, defaults to `false`.
214+
215+
````md
216+
```jsx lineNumbers=true
217+
```
218+
````
219+
220+
- `lineHighlight`: Will highlight lines of code in the snippet. You can supply individual line numbers separted by commas, or ranges by using a hyphen. Be sure not to use any spaces.
221+
222+
````md
223+
```jsx lineHighlight=1,3,6-8,10
224+
```
225+
````
226+
227+
- `copy`: `true` or `false`. Will display or not display the copy button, defaults to `true`
228+
````md
229+
```jsx copy=false
230+
```
231+
````
232+
233+
## Callouts
234+
235+
Callouts direct your attention to information of special importance or to information that doesn't fit smoothly into the main text.
236+
237+
- Caution: Screams at you that this could cause a crash or cost you data loss beyond the task at hand.
238+
- Important: Urges awareness that this could impair the task at hand or cost you time if you ignore the text.
239+
- Tip: Whispers to you that this is nice to know, like a shortcut, best practice, or reminder.
240+
241+
### Usage
242+
243+
```md
244+
<Caution>
245+
246+
Text with `markdown`.
247+
248+
</Caution>
249+
250+
<Important>
251+
252+
Text with `markdown`.
253+
254+
</Important>
255+
256+
<Tip>
257+
258+
Text with `markdown`.
259+
260+
</Tip>
261+
```
262+
263+
All callouts have default titles that can be overridden like this:
264+
265+
```md
266+
<Caution title="A custom title">
267+
268+
Text
269+
270+
</Caution>
271+
```
272+
273+
## Announcement Banner
274+
275+
To utilize the announcement banner that is available in the Global Theme please see these
276+
[instructions](https://github.com/newrelic/gatsby-theme-newrelic/tree/develop/packages/gatsby-theme-newrelic#announcements).

0 commit comments

Comments
 (0)