Creating a Basic Academic Website in Github

1 minute read

Published:

Steps to create a minimal Github website:

If you are bored to read the long tutorial from https://academicpages.github.io/, here is a quick summary steps and a minimal example file to open a minimal academic website. All we need is a Github account and an interface (Github Desktop, VS Code, or anything you like).

  1. (Optional) Register: Register a Github account at https://github.com/signup. Download an interface Github Desktop or VS Code.

  2. (Crucial) Create the repository: Create a new repository at https://github.com/new. Name it EXACTLY as <yourGithubUsername>.github.io (e.g., I named it dawranadeep.github.io).

  3. Clone: Clone (download) it locally. I suggest you use the interfaces, but if you are comfortable with Git functionalities via terminal, do the following:

    1. Ensure Git is installed, or see https://github.com/git-guides/install-git.

    2. In the local machine, at the intended project location, open a terminal/command prompt.

    3. Clone it using:

    git clone <https://github.com>/<yourGithubUsername>/<yourGithubUsername>.github.io
    
  4. Create main.html file In the minimal setup, Github hosts the “main.html” file at the root directory. A minimal html file can use the following code:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title> Ranadeep Daw </title>
  <style>
    body {
      font-family: Arial, sans-serif;
      margin: 2rem;
    }
    h1 {
      font-size: 2rem;
    }
    h2 {
      font-size: 1.5rem;
      margin-top: 1rem;
    }
    p {
      line-height: 1.5;
    }
    a {
      color: #007bff;
    }
    .blog-post {
      margin-bottom: 2rem;
      border-bottom: 1px solid #ddd;
      padding-bottom: 1rem;
    }
    .blog-post-title {
      font-weight: bold;
    }
  </style>
</head>
<body>  
  <h1> Ranadeep Daw </h1>
  <h2> Website </h2>
  <hr>
  <p> Minimal website to post stuff. </p>
  <section>
    <h2> Research Interests </h2>
    <p> Spatial statistics, modeling, individual outcome model, some basic machine learning techniques. </p>
  </section>
  
</body>
</html>
  1. Push (upload) to Github: Again, I suggest to use the interface. If you’re comfortable with terminal, use the following code:
git add .
git commit -m "<some message>"
git push
  1. See updated website at <yourGithubUsername>.github.io

Note, changes are immediate, but not real time. Give it a couple of minutes before seeing the reflected changes.