Skip to content

Commit ad71d6e

Browse files
committed
Add instructions in README
1 parent aa35ac1 commit ad71d6e

File tree

2 files changed

+39
-3
lines changed

2 files changed

+39
-3
lines changed

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,3 +178,38 @@ from the creators of Next.js.
178178
Check out our
179179
[Next.js deployment documentation](https://nextjs.org/docs/deployment) for more
180180
details.
181+
182+
## How do I add/edit contributors for a lesson?
183+
184+
First make sure you add your information to `./data/contributors.ts`. Minimally
185+
you need a unique handle (a single lowercase name such as `brianfive`) which
186+
will be used to look up your information.
187+
188+
Then add a component in your `.mdx` file at the bottom like this, using various
189+
handles defined above.
190+
191+
You can add a contributor as an author, reviewer of contributor. Author(s) wrote
192+
the content, Reviewer(s) edited the content, and Contributor(s) later made
193+
updates or fixed issues.
194+
195+
```jsx
196+
<ContributorFooter
197+
authors={['brianfive']}
198+
reviewers={['piablo', 'georgemac510']}
199+
contributors={[]}
200+
/>
201+
```
202+
203+
## How do I add a specific forum link in a lesson's header?
204+
205+
Make sure the `<LessonHeader />` component has the `discussionUrl` attribute
206+
like this:
207+
208+
```jsx
209+
<LessonHeader
210+
title="Lesson 4: Testing your TierNFT"
211+
discussionUrl="https://developerdao.peeranha.io/discussions/1372/testing-solidity-contracts"
212+
/>
213+
```
214+
215+
Without `discussionUrl` the link will default to the home page of Peeranha.

data/contributors.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ export interface ContributorLookup {
99
[key: string]: ContributorDetails
1010
}
1111

12+
/**
13+
* This is a mapping of handles to contributor details. The handle key will be used
14+
* in the <ContributorFooter /> component to look up the details.
15+
*/
1216
export const contributors: ContributorLookup = {
1317
brianfive: {
1418
displayName: 'Brian Gershon',
@@ -23,7 +27,4 @@ export const contributors: ContributorLookup = {
2327
georgemac510: {
2428
displayName: 'georgemac510',
2529
},
26-
lorem: {
27-
displayName: 'Lorem Ipsum',
28-
},
2930
}

0 commit comments

Comments
 (0)