updated contributing guide

This commit is contained in:
leah 2021-08-26 01:27:03 +01:00
parent 7e84ee27d4
commit 634c3d4bd0
5 changed files with 118 additions and 7 deletions

View File

@ -1,12 +1,111 @@
+++
title = "Contributing"
description = "how to help out"
description = "make a change to this terrible website"
+++
<div class="infobox infobox-warning">This is slightly rough, I need to make it less terrible but I don't have a lot of time at the moment, feel free to ping me once in a while to remind me.</div>
## tl;dr
- Fork the [source repository](https://tildegit.org/southlondon/library)
- Make your changes (you might want to check the [zola docs](https://getzola.org/documentation/) for more info on how to do that)
- Clone and make your changes (you might want to check the [zola docs](https://getzola.org/documentation/) for more info on how to do that)
- Make a pull request
- Scream at me on irc until I review it
- You've
- You've
## The long version
*Note:* If you get stuck at any point, feel free to write me an email at `cark <at> southlondon <dot> cc`, or ask in the irc room.
We use `git`, a version control system, to manage the library and keep track of changes. Here's how you install it:
### On South London
`git` is installed and avaliable for all user accounts, `ssh` in and carry on with the guide.
### On Windows
Head on down to [the git download page](https://git-scm.com/download/win) and run the installer it gives you. You probably don't need to touch the defaults, just click next and wait for it to install. If you have `scoop` or `choco` installed, you can use those to install it as well.
What happens next depends slightly on your Windows version. **On Windows 11:** Look for the Windows Terminal application in your start menu, or right click the start button and choose "Windows Terminal" in the menu.
**On Windows 7, 8, 8.1 or 10:** Look for Windows PowerShell in the All Apps list, or right click on the start button and choose "Windows PowerShell"
After that, a window should open, and after a few seconds, should look a little something like this:
![A Windows Terminal window](/img/term.png)
At this point, you're ready to [carry on with the guide](./#time-to-fork).
### On Linux
`git` is pre-installed on most distros; If it isn't, you'll have to search your package manager for the correct package, it's usually called `git`.
Now, [carry on with the guide](#time-to-fork).
### On MacOS
The easiest way is to use [homebrew](https://brew.sh). If you don't have it installed already, just follow the steps on [their homepage](https://brew.sh#install). Then just type the command below to install `git`.
```bash
brew install git
```
## Time to fork
Next, you'll need to sign up for an account on the [Tildeverse's Gitea instance](https://tildegit.org). Then just [navigate to the git repo](https://tildegit.org/southlondon/library) and click Fork.
![The fork button in Gitea](/img/fork.png)
This will create a copy of the repo that you can modify yourself, and then use to create a pull request. [This here Github article](https://guides.github.com/activities/forking/) explains how pull requests work in a bit more depth (the article is written for github but gitea's layout is pretty much identical).
## Clone it to your computer
Now, pull up a terminal window and enter the following
```
git clone https://tildegit.org/<your gitea username>/library.git
```
This will create a local copy (i.e. on your computer) of the repository that is linked with the repository on gitea, so you can make changes on the local copy and "push" the changes to gitea.
## Make your changes
You can find the cloned repository in your user's home folder (`C:\Users\Username` on Windows), open up the file you want to edit and make the changes you want to.
All the articles in this wiki are written in **Markdown**, which is pretty dang easy to use, check out this [cheat sheet](https://guides.github.com/pdfs/markdown-cheatsheet-online.pdf) for a quick reference.
## Send it off
In `git`, each change is marked with a commit, which describes what you did and what files were changed. To create a commit, just do
```bash
cd library # navigate into the repository
git add . # make git aware of your changes
git commit -m "<describe your changes here>" # make the commit
```
If git complains about not having your details, run these commands:
```bash
git config --global user.name "<your name>"
git config --global user.email "<the email you used to sign up to gitea>"
```
Now just do `git push` to send your changes to gitea:
```
git push
```
Git will prompt you for you login details, enter them and your changes will be written to your fork.
## Make a pull request
Now you've pushed your changes, go back to your fork and click the "New Pull Request" button, and then click the green "New Pull Request" button on the next page. Describe your changes in the text field and then press "Create pull request".
## Wait
Now for the fun part, wait until someone reviews your changes. If said someone requests reviews, just head back to the [make your changes](#make-your-changes) & [send it off](#send-it-off) section to revise your changes. Once they're happy, they'll merge your changes into the main repository. Good job!
## Congratulations!
You've done the thing! Now revel in the glory of having made a contribution to a small pubnix.

View File

@ -151,7 +151,11 @@ pre {
color: #d9d5f3;
font-family: 'Jetbrains Mono', monospace;
font-size: 0.8em;
font-size: 0.9em;
code {
border: none;
padding: none;
}
}
code {
@ -160,9 +164,16 @@ code {
background: #423c63;
border: 1px #6a6391 solid;
border-radius: 4px;
color: #d9d5f3;
font-family: 'Jetbrains Mono', monospace;
font-size: 0.8em;
font-size: 0.9em;
}
img {
max-width: 100%;
border: 1px #6a6391 solid;
border-radius: 4px;
box-shadow: 2px 2px 8px 1px rgba(0,0,0,0.25);
}

BIN
static/img/fork.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

BIN
static/img/term.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 602 KiB

View File

@ -8,6 +8,7 @@
{{ page.content | safe }}
<hr>
<details>
<summary>Get a copy of this Library</summary>
<h4>Using <code>git</code></h4>