|
| 1 | +# How to contribute |
| 2 | + |
| 3 | +The Django Girls Tutorial is licensed under a *Creative Commons Attribution-ShareAlike 4.0* license. Everyone is free to add, edit and correct the tutorial. |
| 4 | + |
| 5 | +# Editing basics |
| 6 | + |
| 7 | +The source code of the tutorial is [hosted on Github](http://github.com/DjangoGirls/tutorial). The Github [Fork & Pull workflow](https://help.github.com/articles/using-pull-requests) is used to accept and review changes. |
| 8 | + |
| 9 | +The tutorial uses the [GitBook](https://www.gitbook.io/) service for publishing its documentation. [See more information about how Gitbook works](http://help.gitbook.io/). |
| 10 | + |
| 11 | +The tutorial is written in [Markdown mark up language](https://help.github.com/articles/markdown-basics). |
| 12 | + |
| 13 | +You can find any discussions about the contents of the tutorial on the [Github issue tracker](https://github.com/DjangoGirls/tutorial/issues). |
| 14 | + |
| 15 | +# Getting started and prerequisites |
| 16 | + |
| 17 | +For contributing to the tutorial the following is needed to get started: |
| 18 | + |
| 19 | + * a [Github account](https://github.com) |
| 20 | + * in the case of complex edits familiarity with [Git command line basics](https://help.github.com/articles/set-up-git) or familiarity with an app ([Windows](https://windows.github.com/), [Mac](https://mac.github.com/)) to push your edits made on your computer to Github. |
| 21 | + |
| 22 | +## Fork the repository |
| 23 | + |
| 24 | +First fork the [DjangoGirls/tutorial](https://github.com/DjangoGirls/tutorial) repository to your personal Github account: |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | +# Editing chapter content |
| 29 | + |
| 30 | +## Simple changes |
| 31 | + |
| 32 | +For simple changes like typo corrections you can use the Github online editor: |
| 33 | + |
| 34 | + * Open your local fork page on Github, |
| 35 | + * go to *README.md* file in any chapter, |
| 36 | + * press the *Edit* icon (pen) |
| 37 | + |
| 38 | +and you can edit the chapter directly on github.com. |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | +Markdown syntax is used to edit the individual pages of the tutorial. |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | +Save your changes and create a pull request as explained below. |
| 47 | + |
| 48 | +## New content and complex changes |
| 49 | + |
| 50 | +For adding new chapters, writing longer snippets of text or adding images, you need to get a copy of the tutorial to your local computer. |
| 51 | + |
| 52 | +Either use the Github app for your operating system (mentioned above) or `git` command line to get the repository locally. You get the repository address from the front page of your own Github repository fork: |
| 53 | + |
| 54 | + git clone [email protected]:yourgithubusername/tutorial.git |
| 55 | + |
| 56 | + |
| 57 | +Download the [Gitbook Editor](http://help.gitbook.io/editor/README.html) app to your computer. |
| 58 | + |
| 59 | +Then you can open the tutorial in Gitbook Editor (*File* > *Open book*). |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | +Make any changes in the tutorial using the editor and then save changes (*Book* > *Save all*). |
| 64 | + |
| 65 | +Then commit the changes using `git` and push the changes to your remote Github repository. |
| 66 | + |
| 67 | +Example: |
| 68 | + |
| 69 | + $ git status |
| 70 | + On branch contributing |
| 71 | + Untracked files: |
| 72 | + (use "git add <file>..." to include in what will be committed) |
| 73 | + |
| 74 | + contributing_and_editing_this_book/images/gitbook.png |
| 75 | + |
| 76 | + $ git add contributing_and_editing_this_book/images/gitbook.png |
| 77 | + |
| 78 | + $ git commit -m "Added gitbook editor screenshot" |
| 79 | + [contributing fe36152] Added gitbook screenshot |
| 80 | + 1 file changed, 0 insertions(+), 0 deletions(-) |
| 81 | + create mode 100644 contributing_and_editing_this_book/images/gitbook.png |
| 82 | + |
| 83 | + $ git push |
| 84 | + Counting objects: 11, done. |
| 85 | + Delta compression using up to 8 threads. |
| 86 | + Compressing objects: 100% (5/5), done. |
| 87 | + Writing objects: 100% (5/5), 266.37 KiB | 0 bytes/s, done. |
| 88 | + Total 5 (delta 1), reused 0 (delta 0) |
| 89 | + To [email protected]:miohtama/tutorial.git |
| 90 | + b37ca59..fe36152 contributing -> contributing |
| 91 | + |
| 92 | + |
| 93 | +# Making a pull request |
| 94 | + |
| 95 | +After you have finished your changes you need to create [a pull request](https://help.github.com/articles/using-pull-requests) on Github. DjangoGirls will get notified about the pull request, review your changes, suggest any corrections if needed and then *pull* your changes to the master version. |
| 96 | + |
| 97 | +In your own repository on Github press do *Compare & pull request* |
| 98 | + |
| 99 | + |
| 100 | + |
| 101 | +Fill in the information *why* this change is being made. The reviewer can see the details of the actual change, so you don't need repeat the content of the change. |
| 102 | + |
| 103 | +Then press *Create pull request*. |
| 104 | + |
| 105 | +Github emails will notify you for the follow up process. |
| 106 | + |
| 107 | +# Further information and help |
| 108 | + |
| 109 | +For any questions please [contact DjangoGirls](http://djangogirls.org/). |
0 commit comments