Skip to content

Installing GitHub And Adding Images

namangoel1 edited this page Jan 10, 2015 · 2 revisions

If you're a student, you can add your name and photo to FOSSASIA's website by uploading your image and editing the students.json file in the _data folder. Steps are described below:

Command Line Method (Recommended)

  1. Sign up or login into GitHub

  2. Fork this repository using button in right top corner.

  3. Enter in console git clone https://github.com/YOURGITHUBUSERNAME/fossasia.github.io.git. This makes a local copy of all files from the repository.

  4. Go to the folder using cd fossasia.github.io command. cd means to Change Directory.

  5. Copy your photo to images/students directory. **If the image isn't exactly square (i.e., width = height ), it cannot be accepted. About 300px x 300px is good. Please ensure a lowercase extension (jpg instead of JPG).

  6. Enter command git add images/students/nameofyourphoto.yourfilextenstion into the command line. This adds your image to git.

  7. Use any editor to open _data/students.json file. See the template below and edit it with your own data. For social networks, please only enter your username, not the whole URL. Feel free to remove lines of social networks you're not a part of.

{
    "social": {
        "github": "your github username",
        "twitter": "your twitter username, no @",
        "facebook": "your facebook username",
        "mail": "your email ID",
        "link": "A link to your website/other profile",
        "gplus": "Google plus username, without +"
    },
    "imgName": "The filename of the image you added.extension",
    "name": "Your Name"
},
  1. Enter command git add _data/students.json to add changes to git.

  2. Commit changes to git by entering git commit -m "Added photo and information" in the console.

  3. Send them to the server by typing git push origin master in the console.

  4. Go to the browser and your forked repository and press the green "Pull request" button.

  5. Describe what changes have you made and press "Create pull request".

  6. You're done! Wait till your pull request is reviewed.

GUI (For Windows users only)

  1. Signup for a GitHub account , or Login if you already have one.

  2. Download the setup for GitHub from Windows GitHub

Download Button Preview

Click on Download GitHub for Windows to download GitHub.

  1. The download will take a while (depending on your Internet connection). After the installation, a window like this should appear:

GitHub Window Preview

  1. Login and then open up your web browser and log in to your account. Go to FOSSASIA's GitHub Repository and click on Fork at the top right corner.

Forking Preview

  1. Open up your GitHub client and clone the repository by clicking on the + sign on the top right corner, selecting Clone and then Clone fossasia.github.io.

Cloning Repository Preview

  1. The cloning process may take a while. After that, open up the cloned folder fossasia.github.io, navigate to images/students and add your image there.

  2. Use any editor to open _data/students.json file. See the template below and edit it with your own data. For social networks, please only enter your username, not the whole URL. Feel free to remove lines of social networks you're not a part of.

{
    "social": {
        "github": "your github username",
        "twitter": "your twitter username, no @",
        "facebook": "your facebook username",
        "mail": "your email ID",
        "link": "A link to your website/other profile",
        "gplus": "Google plus username, without +"
    },
    "imgName": "The filename of the image you added.extension",
    "name": "Your Name"
},

The text without inverted quotes should be your own credentials—your own facebook URL (not the complete, but just the part after .com), your email, your twitter (without the @) etc. Note the commas and the quoted values. All social links are optional, you can even remove the social part entirerly.

  1. When you are done, your GitHub client’s window should look something like this:

Making The Changes Preview

Describe the changes made and then click on Sync at the top right corner.

  1. After that, open up your forked repository from your profile with the url https://github.com/[yourusername]/fossasia.github.io.git.

Making The Pull Request Preview

  1. Now click on Pull Request; describe the changes you made and click on Create Pull Request.

You're done! Wait till your pull request is reviewed.