You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix: replace instructions to install and run docsify with Docusaurus
* fix: remove method 2 of running docsify
* feat: add a note that the project is built with Docusaurus
* feat: add an instruction to add front matter
* fix: update instruction to add sidebar
* fix: markdown link example
* fix: broken links
* fix: yaml format to follow the existing
* fix: grammar
* fix: markdown link example
* fix: add /learn to the localhost path
---------
Co-authored-by: BekahHW <34313413+BekahHW@users.noreply.github.com>
Copy file name to clipboardExpand all lines: contributing/CONTRIBUTING.md
+46-71Lines changed: 46 additions & 71 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,7 +65,7 @@ We actively welcome your PRs. However, before working on changes, you must ensur
65
65
66
66
### Setup the Project Locally
67
67
68
-
1.[Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) the [intro repository](github.com/open-sauced/intro) to your own GitHub account.
68
+
1.[Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) the [intro repository](https://github.com/open-sauced/intro) to your own GitHub account.
69
69
2.[Clone](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) the forked repository to your local machine.
70
70
71
71
```bash
@@ -86,80 +86,32 @@ We actively welcome your PRs. However, before working on changes, you must ensur
86
86
87
87
Replace "YOUR-BRANCH-NAME" with a descriptive name for your branch — for example, `feat/add-submit-button`.
88
88
89
-
5.Run the project.
89
+
5.Install the dependencies and run the project.
90
90
91
-
### Running the Project Locally
91
+
### Local Development
92
92
93
-
Running the project locally is essential to see your changes in real-time and test them thoroughly when you're contributing.
94
-
95
-
We recommend one of these two methods for running the project on your local machine:
96
-
97
-
1. Using the [docsify CLI](https://docsify.js.org/#/).
98
-
2. Leveraging Visual Studio Code's [Live Server](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer) extension.
99
-
100
-
#### Method 1: Using the docsify CLI
101
-
102
-
1.**Install Node.js**.
93
+
> [!NOTE]
94
+
> This project is built with [Docusaurus](https://docusaurus.io/).
103
95
104
-
You can download it from the official [Node.js website](https://nodejs.org/).
105
-
106
-
2.**Install docsify globally**.
107
-
108
-
It's highly recommended to install docsify globally. In your terminal, run the following command:
109
-
110
-
```bash
111
-
npm install -g docsify-cli
112
-
```
96
+
Running the project locally is essential to see your changes in real-time and test them thoroughly when you're contributing.
113
97
114
-
3.**Run the project**.
98
+
1.**Install the dependencies and run the project locally**.
115
99
116
100
```bash
117
-
docsify serve docs
101
+
npm ci
102
+
npm start
118
103
```
119
104
120
-
This command will start a local development server, and you can access the project in your web browser at `http://localhost:3000`.
105
+
After the local development server is ready, it will automatically open the project at `http://localhost:3000/learn` on your browser.
121
106
122
-
4.**Make and test changes**.
107
+
2.**Make and test changes**.
123
108
124
109
With the local server running, you can make changes to the files and immediately see the results in your browser. Test your changes thoroughly.
125
110
126
-
5.**Stop the server**.
111
+
3.**Stop the server**.
127
112
128
113
After completing and testing the changes, you can stop the local server by pressing `Ctrl + C` in the terminal.
129
114
130
-
#### Method 2: Using Live Server Extension on Visual Studio Code (VS Code)
131
-
132
-
Live Server extension allows you to launch a local development server and preview your changes in real time in your browser.
133
-
134
-
1.**Install Visual Studio Code**.
135
-
136
-
Download [Visual Studio Code](https://code.visualstudio.com/) and install it if you haven't.
137
-
138
-
2.**Open the project in VS Code**.
139
-
140
-
Launch VS Code, open the project folder by selecting "File" > "Open Folder", and choose the project directory.
141
-
142
-
3.**Install the Live Server extension**.
143
-
144
-
- Click "View" on the top bar of the VS Code.
145
-
- Click "Extensions".
146
-
147
-
Alternatively, press the shortcut `Ctrl + Shift + X` to open the "Extensions" menu.
148
-
149
-
- Search for "Live Server" by Ritwick Dey and install it.
150
-
151
-
4.**Launch the Live Server**.
152
-
153
-
Click the "Go Live" button in the bottom-right corner of the VS Code window. It will open a new tab on your browser at a local address. Then, click the "docs" folder to see the project in live mode.
154
-
155
-
5.**Make and test changes**.
156
-
157
-
With the Live Server running, you can make changes to the files using VS Code, and the changes will be automatically reflected in your browser. Test your changes thoroughly.
158
-
159
-
6.**Stop the Live Server**.
160
-
161
-
When you're done testing or making changes, you can stop the Live Server by clicking the "Port: 5500" button in the VS Code status bar at the bottom-right corner.
162
-
163
115
## Working with the Content
164
116
165
117
The contents of our courses are written in [Markdown](https://www.markdownguide.org/), a lightweight and easy-to-use markup language that allows you to format text in a readable and visually appealing way.
@@ -168,7 +120,7 @@ Please read the "[Using Markdown for This Project](#using-markdown-for-this-proj
168
120
169
121
### Adding Definitions to the Glossary
170
122
171
-
If you add definitions to the "Glossary" chapter in the [Intro to Open Source](./intro-to-oss/glossary.md) or [Becoming a Maintainer](./becoming-a-maintainer/glossary.md) course, ensure the definitions are added **alphabetically**.
123
+
If you add definitions to the "Glossary" chapter in the [Intro to Open Source](../docs/intro-to-oss/glossary.md) or [Becoming a Maintainer](../docs/becoming-a-maintainer/glossary.md) course, ensure the definitions are added **alphabetically**.
172
124
173
125
### Adding a New Section to a Chapter
174
126
@@ -190,38 +142,61 @@ Follow these steps to add a new chapter to our course:
190
142
191
143
> **NOTE**: Be sure to follow naming conventions. Notice that file names are not capitalized, and there are hyphens in place of spaces between words.
192
144
193
-
2.**Write content**.
145
+
2.**Add front matter**.
146
+
147
+
At the beginning of the file, add front matter that is enclosed by three dashes `---` with below variables:
148
+
149
+
-`id`: The ID is used to refer to a document when hand-writing sidebars. You can use the file name as an ID.
150
+
-`title`: The chapter's title (`h1`).
151
+
-`sidebar_label`: The title on the sidebar.
152
+
-`keywords`: Keywords for the topics in the chapter.
Open the newly created Markdown file in a text editor and write the content for your chapter using the Markdown syntax. You can include headings, text, images, links, lists, and other elements to present your information effectively.
196
168
197
169
> **NOTE**: There should only be **one**`heading 1` in each file.
198
170
199
-
3.**Test your changes**.
171
+
4.**Test your changes**.
200
172
201
173
Before finalizing your new chapter, you should test your changes locally. You can build or render the project to ensure your new chapter appears as expected within the course structure.
202
174
203
-
4.**Update the sidebar**.
175
+
5.**Update the sidebar**.
204
176
205
177
After you add a new chapter, you must also add it to the sidebar for the users to discover the content.
206
178
207
179
#### Adding New Chapters to the Sidebar
208
180
209
-
The sidebar in our course serves as a navigation menu. So, when you add a new chapter to the course, it's important to update the sidebar by including the link to the chapter. That way, users can navigate to the content seamlessly.
181
+
The sidebar serves as a navigation menu. So, when you add a new chapter to a course, it's important to update the sidebar by including the link to the chapter. That way, users can navigate to the content seamlessly.
210
182
211
183
Follow these steps to add new chapters to the sidebar:
212
184
213
-
1. Open the `_sidebar.md` file in the course directory.
185
+
1. Open the `sidebars.js` file located on the root.
214
186
2.**Add the new chapter link**.
215
187
216
-
- Insert your new chapter in the list. If you're unsure where best to put it, you can comment on the issue and tag the `@open-sauced/docs` maintainers to ask for help.
188
+
- Insert your new chapter in the `items` array of the related course. If you're unsure where best to put it, you can comment on the issue and tag the `@open-sauced/docs` maintainers to ask for help.
217
189
- Use the below format to add the link to the new chapter:
218
190
219
-
```markdown
220
-
- [Intro](intro.md)
191
+
```text
192
+
'FOLDER-NAME/ID',
221
193
```
222
194
223
-
- Replace `Intro` with the title of your new chapter. _Be sure to capitalize the title_.
224
-
- Replace `intro.md` with the name of the Markdown file of your new chapter.
195
+
Replace `FOLDER-NAME` with the course's folder name and `ID` with the `id` in the file's front matter. For example:
0 commit comments