ultralytics / docs

Ultralytics Docs at https://docs.ultralytics.com
https://docs.ultralytics.com
GNU Affero General Public License v3.0
35 stars 2 forks source link

How to Create GitHub Pages from Scratch? #76

Closed nerbivol closed 1 month ago

nerbivol commented 3 months ago

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!

github-actions[bot] commented 3 months ago

👋 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 commented 3 months ago

@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:

2. Branch Configuration

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

3. Custom Domain

To use a custom domain like learnmath.io:

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 commented 3 months ago

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 commented 3 months ago

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!

github-actions[bot] commented 2 months ago

👋 Hello there! We wanted to give you a friendly reminder that this issue has not had any recent activity and may be closed soon, but don't worry - you can always reopen it if needed. If you still have any questions or concerns, please feel free to let us know how we can help.

For additional resources and information, please see the links below:

Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!

Thank you for your contributions to YOLO 🚀 and Vision AI ⭐

glenn-jocher commented 2 weeks ago

@nerbivol yes, you can use the project as a template. For the DNS error, ensure your domain's DNS settings include a CNAME record pointing to username.github.io. Also, verify that your domain is correctly configured in the GitHub Pages settings under Custom domain.