Add GitHub Pages dependency package

Add GitHub Pages dependency package

If you are looking for a way to host your website for free and share your project with the world, GitHub Pages is the perfect solution. GitHub Pages is a free service provided by GitHub that allows you to host your static website directly from a GitHub repository. To add GitHub Pages dependency package, follow the steps below:

Step 1: Create a GitHub Repository

  • Go to github.com and sign up or log in to your account.
  • Create a new repository by clicking on the "New" button.
  • Name your repository as "username.github.io" where "username" is your GitHub username. Make sure your repository is public.
  • Click on the "Create repository" button.

Step 2: Create an HTML file

  • Create an HTML file with a basic structure that includes a head and body section.
  • Save the file with the name "index.html" and add it to your repository.

Step 3: Add GitHub Pages Dependency Package

GitHub Pages requires a Jekyll theme to render your HTML file. To add this dependency package, follow the steps below:

  1. Create a file named Gemfile in the root directory of your repository.
  2. Add the following code to it:

        source 'https://rubygems.org'
        gem 'github-pages', group: :jekyll_plugins
    
  1. Commit and push the Gemfile to your repository.

Congratulations! You have successfully added the GitHub Pages dependency package to your repository. Now, you can visit your website at "https://username.github.io" where "username" is your GitHub username.

Subscribe to The Poor Coder | Algorithm Solutions

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
[email protected]
Subscribe