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
Copy file name to clipboardExpand all lines: contributing.qmd
+49-5Lines changed: 49 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ format:
7
7
toc-expand: 4
8
8
---
9
9
10
-
You can contribute to the {{< var title >}} by making small edits, writing entirely new topics, or writing guides. All contributions are welcome and appreciated, small and large. If you are in need of specific information, you can skip ahead using the table of contents.
10
+
You can contribute to the {{< var title >}} by making small edits, writing entirely new topics, or writing guides. All contributions are welcome and appreciated, small and large. There are two ways to contribute: [via GitHub](#contributing-via-github) or by using the [contribution portal](#contributing-portal). If you are in need of specific information, you can skip ahead using the table of contents.
11
11
12
12
## Contributing portal
13
13
@@ -27,7 +27,7 @@ The portal does not save your work. Use the portal when you are ready to submit
27
27
28
28

29
29
30
-
If you want to be credited with contributing, please share your name. If you'd like to hear back about what was done with your feedback or proposal, please also provide a direct way to contact you.
30
+
If you want to be credited with contributing, please share your name. If you'd like to hear back about what was done with your feedback or proposal, please also provide a direct way to contact you. Once you have submitted the contribution, the editors will decide how to add your contribution to the handbook. Take a look at the [Editor's guide](./editors-guide.qmd) to learn more about what criteria they consider.
31
31
32
32
## Contributing via GitHub
33
33
@@ -125,7 +125,7 @@ We recommend keeping your suggested changes small or limited in scope, and expla
125
125
126
126
If you are adding a **new** topic or guide, it is definitely recommended to [open an issue first]({{< var issue-url >}}) to see whether there is a need for it (and maybe you'll find collaborators!).
127
127
128
-
During the review process you may be asked to update your changes, or revisions may be added by the people maintaining the handbook. It is helpful if you keep an eye on your GitHub account to ensure timely responses to help the process along. By contributing, you become part of the process :blush:
128
+
During the review process you may be asked to update your changes, or revisions may be added by the people maintaining the handbook. It is helpful if you keep an eye on your GitHub account to ensure timely responses to help the process along. By contributing, you become part of the process :blush:. Once you have submitted the contribution, the editors will decide how to add your contribution to the handbook. Take a look at the [Editor's guide](./editors-guide.qmd) to learn more about what criteria they consider.
129
129
130
130
### Writing text
131
131
@@ -242,15 +242,59 @@ For more details on citations, [see also the Quarto help page on citations](http
242
242
243
243
## Rendering handbook locally
244
244
245
-
Sometimes you may want to preview the changes you are making to the handbook. That is possible in most cases, but requires you to install some software. [You need to install Quarto](https://quarto.org/docs/download/) and assuming a successful installation, you then need to run the following code in your terminal:
245
+
Sometimes you may want to preview the changes you are making to the handbook. That is possible in most cases, but requires you to install some software. [You need to install Quarto](https://quarto.org/docs/download/) and assuming a successful installation, you then need to run the following code in your terminal[^1]:
This will create a file called _site/index.html. You can now open the rendered website in your browser by running:
257
+
258
+
```sh
259
+
# For Windows machines, use
260
+
start <browser-name> _site/index.html
261
+
# For Mac machines, use
262
+
open _site/index.html
263
+
# For Linux, it could depend on the exact Linux operating system, but you could try first
264
+
xdg-open _site/index.html
265
+
```
266
+
267
+
Note that you should not copy the < and >, they are written here to indicate where the browser name should come.
268
+
269
+
Alternatively, you could also `preview` the website rather than rendering it. For this you can simply run the command `quarto preview`. This command will open a localhost window in your browser, and you can navigate through the handbook as normal. Your terminal will keep track of any pages you open.
270
+
When you want to continue working in your terminal, you can use Control + C to quit the command; this will also terminate the connection with the localhost window in your browser.
271
+
272
+
You can also make changes locally and push them to the github repo to open a new branch. The procedure for this in your terminal is as follows:
273
+
274
+
```sh
275
+
# Navigate to the folder where the file you want to edit is located
276
+
cd<foldername>
277
+
# Open the file to edit
278
+
nano <filename>
279
+
# Edit the file and save by using `Control + O`. Exit nano by `Control + X`
280
+
# Add the file to the staging area
281
+
git add <filename>
282
+
# Commit the edits
283
+
git commit -m "<commit message>"
284
+
# Push the edits to the remote (online) repository. You can only push to a new branch: the main branch is protected.
285
+
# If you do not have editing rights to the handbook repository, you would be pushing to your fork.
286
+
git push origin main:<new-branch-name>
287
+
# You may have to authenticate using your SSH key.
288
+
```
289
+
290
+
Note that you should not copy the < and >, they are written here to indicate where file and folder names should be written.
291
+
After doing this, your new branch is opened in the repository on GitHub and you can create a pull request.
292
+
293
+
This procedure requires some background knowledge on working (with git) in the command line. The resources below give more explanation:
294
+
295
+
*[Navigating Files and Directories](https://swcarpentry.github.io/shell-novice/02-filedir.html) and [Create a text file](https://swcarpentry.github.io/shell-novice/02-filedir.html) from the Carpentries' Unix Shell lesson.
296
+
*[Collaborating](https://swcarpentry.github.io/git-novice/08-collab.html) and [Push local branches to a remote](https://swcarpentry.github.io/git-novice/08-collab.html) from the Carpentries' Version Control with Git lesson.
297
+
256
298
We do not guarantee this will work immediately, but should cover most instances. If you are looking to contribute and want to render things locally, try this first, and if you run into any issues, [let us know in an issue report](https://github.com/ubvu/open-handbook/issues/new). We're happy to try our best if you share your error messages 😊
299
+
300
+
[^1]: For Linux and Mac, this is usually called the terminal. For Windows machines, you would have to use [the Git Bash](https://swcarpentry.github.io/git-novice/08-collab.html)
0 commit comments