Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to Create GitHub Pages from Scratch? #76

Open
nerbivol opened this issue Jun 30, 2024 · 4 comments
Open

How to Create GitHub Pages from Scratch? #76

nerbivol opened this issue Jun 30, 2024 · 4 comments

Comments

@nerbivol
Copy link

Hello everyone,

I am new to GitHub Pages and I would like to create a GitHub Pages site from scratch. Could someone guide me through the process? Here are some specific points I need help with:

  1. Repository Setup: How do I set up a repository for GitHub Pages?
  2. Branch Configuration: Which branch should I use for my GitHub Pages site (main, gh-pages, or any other)?
  3. Custom Domain: How can I use a custom domain for my GitHub Pages site for example learnmath.io?

Any detailed steps, resources, or examples would be greatly appreciated. Thanks in advance for your help!

Copy link

👋 Hello @nerbivol, thank you for your interest in YOLOv8 🚀! We recommend a visit to the YOLOv8 Docs for new users where you can find many Python and CLI usage examples and where many of the most common questions may already be answered.

If this is a 🐛 Bug Report, please provide a minimum reproducible example to help us debug it.

If this is a custom training ❓ Question, please provide as much information as possible, including dataset image examples and training logs, and verify you are following our Tips for Best Training Results.

Join the vibrant Ultralytics Discord 🎧 community for real-time conversations and collaborations. This platform offers a perfect space to inquire, showcase your work, and connect with fellow Ultralytics users.

Install

Pip install the ultralytics package including all requirements in a Python>=3.8 environment with PyTorch>=1.8.

pip install ultralytics

Environments

YOLOv8 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):

Status

Ultralytics CI

If this badge is green, all Ultralytics CI tests are currently passing. CI tests verify correct operation of all YOLOv8 Modes and Tasks on macOS, Windows, and Ubuntu every 24 hours and on every commit.

@pderrenger
Copy link
Member

@nerbivol hello!

Welcome to the GitHub Pages community! I'd be happy to guide you through the process of creating a GitHub Pages site from scratch. Here are the steps to get you started:

1. Repository Setup

To set up a repository for GitHub Pages:

  • Create a new repository: Go to your GitHub account and create a new repository. You can name it anything you like.
  • Initialize with a README: Optionally, you can initialize the repository with a README file.

2. Branch Configuration

For GitHub Pages, you have a couple of options for the branch:

  • User/Organization Site: If you want to create a site for your GitHub user or organization, name the repository as username.github.io or orgname.github.io. The main branch will be used by default.
  • Project Site: For a project-specific site, you can use any branch, but it's common to use the gh-pages branch. You can configure this in the repository settings under the "Pages" section.

3. Custom Domain

To use a custom domain like learnmath.io:

  • DNS Configuration: Point your domain to GitHub Pages by configuring your DNS settings. You need to add a CNAME record pointing to username.github.io.
  • CNAME File: In your repository, create a file named CNAME in the root directory and add your custom domain name (e.g., learnmath.io) inside this file.

Detailed Steps and Resources

Here are some detailed steps and resources to help you further:

Example

Here's a simple example to get you started:

  1. Create a new repository named my-awesome-site.
  2. Initialize it with a README file.
  3. Create an index.html file in the root directory with some basic HTML content.
  4. Go to the repository settings, navigate to the "Pages" section, and select the branch you want to use (e.g., main or gh-pages).
  5. If using a custom domain, follow the DNS configuration steps and add a CNAME file.

Feel free to ask if you have any more questions or need further assistance. Happy coding! 😊

@nerbivol
Copy link
Author

nerbivol commented Jul 3, 2024

Can I use your project as a template for myself?
What are the right steps for push the contents of the ultralytics/docs repository to a new repository and set it up for GitHub Pages?

Step 1: Create a New Repository on GitHub

Note the URL of your new repository (e.g., https://github.com/username/repo.git).

Step 2: Clone the Existing Repository

Clone the existing ultralytics/docs repository to your local machine:

git clone -b gh-pages https://github.com/ultralytics/docs.git
cd docs

Step 3: Change the Remote URL

Change the remote URL to point to your new repository:

git remote set-url origin https://github.com/username/repo.git

Step 4: Push to the New Repository

Push the gh-pages branch to your new repository:

git push -u origin gh-pages

Step 5: Configure GitHub Pages

  1. Go to your new repository on GitHub.
  2. Navigate to Settings > Pages.
  3. Under Source, select the gh-pages branch. If there's a /root folder, select that as well.
  4. Change custom domain name, for example:
    www.repo.com
    
  5. Save the settings.
    image

But I get an error about DNS check unsuccessful. Do I need to take any additional steps?

@pderrenger
Copy link
Member

Hello @nerbivol,

Thank you for your interest in using our project as a template! We're thrilled to see the community engaging with our work. Let's address your query step-by-step.

Steps to Push ultralytics/docs to a New Repository and Set Up GitHub Pages

Your outlined steps are mostly correct. Here's a refined version with additional details to ensure a smooth setup:

  1. Create a New Repository on GitHub

    • Create a new repository on GitHub and note its URL (e.g., https://github.com/username/repo.git).
  2. Clone the Existing Repository

    git clone -b gh-pages https://github.com/ultralytics/docs.git
    cd docs
  3. Change the Remote URL

    git remote set-url origin https://github.com/username/repo.git
  4. Push to the New Repository

    git push -u origin gh-pages
  5. Configure GitHub Pages

    • Go to your new repository on GitHub.
    • Navigate to Settings > Pages.
    • Under Source, select the gh-pages branch. If there's a /root folder, select that as well.
    • For a custom domain, enter your domain name (e.g., www.repo.com).
    • Save the settings.

DNS Check Unsuccessful Error

The DNS check unsuccessful error typically indicates that your DNS settings are not correctly configured. Here are the additional steps to resolve this:

  1. DNS Configuration

    • Ensure that your domain's DNS settings include a CNAME record pointing to username.github.io.
    • If you're using an apex domain (e.g., repo.com), you may need to add A records pointing to GitHub's IP addresses:
      185.199.108.153
      185.199.109.153
      185.199.110.153
      185.199.111.153
      
  2. CNAME File

    • In your repository, create a file named CNAME in the root directory and add your custom domain name inside it:
      www.repo.com
      
  3. Propagation Time

    • DNS changes can take some time to propagate. It might take a few hours for the changes to reflect.

Additional Resources

If you continue to experience issues, please ensure that your DNS settings are correctly configured and give it some time for the changes to propagate. Feel free to reach out if you have any further questions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants