Skip to content

Commit 09d0da2

Browse files
committed
add CONTRIBUTING.md
1 parent 30ca80a commit 09d0da2

File tree

1 file changed

+107
-0
lines changed

1 file changed

+107
-0
lines changed

CONTRIBUTING.md

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# Contributing
2+
3+
This document explains how to make changes to the documentation.
4+
5+
If you need help, feel free to contact Arian Baishya.
6+
7+
## Structure
8+
9+
The site is currently structured something like this:
10+
11+
- Homepage
12+
- Documentation ("docs" folder)
13+
- Start Here
14+
- Project1 (folder)
15+
- Page1
16+
- Page2
17+
- Page3
18+
- Project2 (folder)
19+
- Page1
20+
- Page2
21+
- Page3
22+
- Project3 (folder)
23+
- Page1
24+
- Page2
25+
- Page3
26+
27+
The following sections will explain how to:
28+
29+
- [Edit a page of an existing project](#edit-a-page-of-an-existing-project)
30+
- [Add a page to an existing project](#add-a-page-to-an-existing-project)
31+
- [Edit the label of an existing project](#edit-the-label-of-an-existing-project)
32+
- [Add a new project](#add-a-new-project)
33+
- [Make a more significant change that isn't covered in this document](#make-a-more-significant-change-that-isnt-covered-in-this-document)
34+
35+
## Edit a page of an existing project
36+
37+
[//]: # (TODO: finish this)
38+
You should be able to just click the "edit this page" link on the site itself, and it'll navigate you
39+
to the right page to edit it. The filetype of the documentation files is called "Markdown", you may want to look up
40+
some details on how to make pretty text in Markdown if you're not already familiar. That way, you can have headers,
41+
links, and other cool formatting (like this page has).
42+
43+
## Add a page to an existing project
44+
45+
Create a file inside the folder of the project you want to edit. Make sure the filename begins with a number that
46+
represents its order in the sidebar. This will ensure it is shown in the correct order.
47+
48+
## Edit the label of an existing project
49+
50+
This is slightly more involved, but effort has been put in to make this simple. Open [this file](./constants.ts) and
51+
edit the string between quotation marks relating to the project you want to edit. As an example. Imagine you have
52+
the following list of projects within the file:
53+
54+
```typescript
55+
const LIST_OF_PROJECT_DOCS: ProjectDocs[] = [
56+
{label: "Start Here", dirName: "start-here", sidebarID: "startHereSidebar"},
57+
{label: "EnMo", dirName: "enmo", sidebarID: "enmoSidebar"},
58+
{label: "STORM", dirName: "storm", sidebarID: "stormSidebar"},
59+
] as const;
60+
```
61+
62+
If you wanted to change the label of the project "STORM" to say "STORM Competition" instead, it would be changed to
63+
this:
64+
65+
```typescript
66+
const LIST_OF_PROJECT_DOCS: ProjectDocs[] = [
67+
{label: "Start Here", dirName: "start-here", sidebarID: "startHereSidebar"},
68+
{label: "EnMo", dirName: "enmo", sidebarID: "enmoSidebar"},
69+
{label: "STORM Competition", dirName: "storm", sidebarID: "stormSidebar"}, // <--- This line was changed
70+
] as const;
71+
```
72+
73+
## Add a new project
74+
75+
If you wanted to add a new project, simply copy an existing project within the project list, and edit it to your liking.
76+
For example, let's add a new project called "Cool Project". Assume the project list initially looked as previously shown
77+
at the beginning of the previous section. After editing, it could look as follows:
78+
79+
```typescript
80+
const LIST_OF_PROJECT_DOCS: ProjectDocs[] = [
81+
{label: "Start Here", dirName: "start-here", sidebarID: "startHereSidebar"},
82+
{label: "EnMo", dirName: "enmo", sidebarID: "enmoSidebar"},
83+
{label: "STORM", dirName: "storm", sidebarID: "stormSidebar"},
84+
{label: "Cool Project", dirName: "cool-project", sidebarID: "coolProjectSidebar"}, // <--- This line was added
85+
] as const;
86+
```
87+
88+
As you may notice, we added a 4th item to the list, leaving all other items untouched. Here is an explanation of the
89+
fields and their values:
90+
91+
`label: "Cool Project"` -> We want the project to show up on the site labeled as "Cool Project"
92+
93+
`dirName: "cool-project"` -> As mentioned in the [Structure](#structure) section, every project has its own folder
94+
inside the "docs" folder. This field states that the documentation for our new project should be in a folder
95+
called "cool-project" inside the "docs" folder. You will probably want to create that directory, assuming it doesn't
96+
already exist.
97+
98+
`sidebarID: "coolProjectSidebar"` -> The value of this doesn't really matter. It just needs to be different from any
99+
other project's "sidebarID" value. I just made it "coolProjectSidebar" because it follows the naming scheme of the other
100+
ones.
101+
102+
## Make a more significant change that isn't covered in this document
103+
104+
[//]: # (TODO: finish this)
105+
Honestly Your best bet will be to ask the designated person/people for help (listed at the top of this document) or look
106+
up "Docusaurus" and figure it out. Depending on what you want to do, you may need to learn Typescript and maybe even
107+
React.

0 commit comments

Comments
 (0)