Create A Static Website With Contact Form On Github Pages

To set up GitHub Pages, follow these steps:

  1. Create a new repository on GitHub: Go to the GitHub website ( and log in to your account. Click on the "New" button to create a new repository. Provide a name for your repository, as "" (replace "username" with your GitHub username). Make sure the repository is set to public.

Make sure your name your repository correctly as shown above and set the repository to public or your site will not work.

  1. Clone the repository: Once the repository is created, you need to clone it to your local machine. Open a terminal or command prompt and run the following command:

    git clone

    Replace "username" with your GitHub username.

  2. Create a basic webpage: In the cloned repository folder, create an index.html file (or any other HTML file) that will serve as the main page for your site. You can use any text editor or an integrated development environment (IDE) to create the file and add your HTML content.

  3. Commit and push the changes: After creating the HTML file, go back to the terminal or command prompt, navigate to the cloned repository folder, and run the following commands:

    git add .
    git commit -m "Initial commit"
    git push origin main

    This will commit and push your changes to the GitHub repository.

  4. Enable GitHub Pages: Go to the repository on GitHub, click on the "Settings" tab, and scroll down to the "GitHub Pages" section. In the "Source" dropdown, select "main" as the branch and "/ (root)" as the folder. Click on the "Save" button.

  5. Access your GitHub Pages site: Once you save the settings, GitHub will generate a URL for your GitHub Pages site. It may take a few moments for the site to be built and deployed. You can access your site by visiting the URL displayed in the GitHub Pages section of your repository settings.

That's it! You have now set up GitHub Pages and published your first webpage. You can continue making changes to your repository, and GitHub will automatically update your site whenever you push new changes to the repository.

To create a form with fabform read our fabform tutorial