owned this note
owned this note
Published
Linked with GitHub
This is a [Jekyll](https://jekyllrb.com/) website. You don't need to know about Jekyll to be able to edit the data on the website.
## Changing the Data
You're most likely here to fix a spelling error, change some wrong details in the data, or add a missing entry. We've designed this website to make precisely this sort of thing very easy to do.
This is achieved by keeping the data separate from the HTML layout. So if you want to fix some data, you just need to know which file has the existing data, hit `ctrl+f` to find it and just make changes.
When you look at the file which has the data, you'll find that it's in a structured format. That format is YAML.
YAML's syntax is designed to be human readable and editing-friendly, so in most cases you'll be able to pick up on what changes you need to make by just looking at examples of existing data. But in case you are interested in a quick overview of YAML, you can find one [here](https://learnxinyminutes.com/docs/yaml/).
### Events: Hackathons, Hackeves, and Techtalks
| Data File | Corresponding Page on the Website |
------------|------------------------------------
| **[site/techtalks.md](https://github.com/IIIT-Delhi/byld-website/blame/master/site/techtalks.md)** | http://byld.iiitd.edu.in/techtalks |
| **[site/hacknights.md](https://github.com/IIIT-Delhi/byld-website/blame/master/site/hacknights.md)** | http://byld.iiitd.edu.in/hacknights |
| **[site/hackathons.md](https://github.com/IIIT-Delhi/byld-website/blame/master/site/hackathons.md)** | http://byld.iiitd.edu.in/hackathons |
### List of Members
**[site/members.md](https://github.com/IIIT-Delhi/byld-website/blame/master/site/members.md)** has the data for http://byld.iiitd.edu.in/members.html . That includes members and admins.
Please edit only your own entry. If you're a member but you aren't listed, mention in the PR when / how you got into Byld.
### Byld Projects on The Homepage
**[site/index.md](http://byld.iiitd.edu.in/#projects)** lists Byld projects.
If you're a member and want to showcase your own projects, you can create your own page with your own custom URL! See http://byld.iiitd.edu.in/members/bob for an example.
### Making Your own Member Page
Coming Soon! We're missing some features right now and we need to put some guidlines in place. You can follow the discussion which has happened on this already here: in https://github.com/IIIT-Delhi/byld-website/pull/24
## Pushing Changes
Once you've made changes, you'd want them to get reflected. That's exactly what you're here for! So in order for that to happen, you need to make a [commit](https://git-scm.com/docs/git-commit) in a personal [fork](https://help.github.com/articles/fork-a-repo/) of this repository, and then make a pull request from your fork to this repository's master branch.
**Note:** (for git newbies) If you didn't understand any of the above, [here](https://guides.github.com/introduction/git-handbook/) is a short git tutorial, and if still stuck, don't hesitate to ask :wink:. We've also provided commands to do all of this [below](#code-for-pushing-changes).
### Guidelines
* Please keep the changes as short as possible. This keeps the `git diff` clean and you'll get a review faster.
* All pull requests need to come from a separate branch. Under no circumstance shall a PR made from master branch of your fork to master branch of this repository will be merged.
* After you submit a pull request, we've set up [Travis CI](https://travis-ci.org/) which builds the project to make sure your edits haven't broken anything. We've also set up [netlify](https://www.netlify.com/) which will provide a link to a version of the website with the changes you made. You'll find this link in the PR's status section:
![image](https://user-images.githubusercontent.com/4688870/42737380-f03d9b84-888f-11e8-82f4-ecc63f4a5bb6.png)
* We also require 1 [review](https://softwareengineering.stackexchange.com/a/255945), which means someone will have to go through the changes you made and give their comments on it - on possible enhancements or on something which might cause bugs / be an [anti-pattern](https://stackoverflow.com/a/980616/1412255) but doesn't seem obvious. If someone doesn't notice your PR within a few days, you can add a comment to your PR asking for a review.
* Please keep the commit history clean - No merge commits, do a rebase if you have to.
* Once all the above is satisfied, some admin will come and merge your PR. We've set up a script, so that after your PR gets merged to the master branch, you can see the changes reflected on the actual website shortly, automatically!
### Code for Pushing Changes
Alright, so now let's go through a sample of git commands to make your pull request:
#### Step 0: [Fork](https://guides.github.com/activities/forking/) this repository using the fork button and then [clone](https://help.github.com/articles/cloning-a-repository/) the forked repository it. (Skip if already done)
Also add this repository as an upstream remote.
```
git clone <your fork link here>
git remote add upstream https://github.com/IIIT-Delhi/byld-website.git
```
#### Step 1: Navigate to the cloned repo
cd byld-website
##### Checkout to master using and ensure in sync
git checkout master && git pull upstream master --rebase
##### Checkout a new branch for your changes
git checkout -b <new_branch_name>
#### Step 2: Make your changes as per your desire and do a `git commit`
#### Step 3: Push your changes to your fork (assuming you followed the above as it is, your fork should have a remote name called `origin`)
git push origin <new_branch_name>
#### Step 4: Make a pull request from your fork ! Follow [these](https://help.github.com/articles/creating-a-pull-request-from-a-fork/) steps for making a pull request.
:tada: You have successfully made a PR. Now what? Wait for a review. When asked to change things, kindly do so and keep all logical changes in *one single commit*. If you have a commit already and need to amend it, you will have to do `git commit --amend` and then a force push, i.e `git push -f origin <new_branch_name>`.
If you faced any difficulty while following any of the steps above, please contact someone and/or suggest changes to this document that would help others understand the above better.