Using GitHub Pages' Flashcards
Q: What is GitHub Pages?
A: A static site hosting service provided by GitHub to host personal, project, or organisation pages directly from a repository.
Q: How do you enable GitHub Pages for a repository?
A: Go to Settings > Pages, select a branch and folder as the source, and save.
Q: What types of repositories can use GitHub Pages?
A: Public and private repositories can use GitHub Pages, but free plans limit it to public repositories.
Q: What is the default URL structure for GitHub Pages?
A: For personal repositories: https://<username>.github.io/<repository-name>.</repository-name></username>
Q: What are the three main types of GitHub Pages sites?
A: User/organisation sites, project sites, and private sites (for paid plans).
Q: How do you create a personal GitHub Pages site?
A: Create a repository named <username>.github.io, push your website files, and enable Pages.</username>
Q: What file is required for GitHub Pages to work?
A: An index.html file in the root directory or the chosen source folder.
Q: Can GitHub Pages host Jekyll-powered static sites?
A: Yes, Jekyll is natively supported by GitHub Pages.
Q: How do you disable Jekyll processing for a GitHub Pages site?
A: Add a .nojekyll file to the root of the repository.
Q: How do you select a custom theme for GitHub Pages?
A: Use the Theme Chooser under Settings > Pages, or include a Jekyll theme in _config.yml.
Q: How do you add a custom domain to a GitHub Pages site?
A: Go to Settings > Pages, enter your domain under Custom Domain, and configure DNS records.
Q: What DNS records are needed for a custom domain on GitHub Pages?
A: A records pointing to GitHub’s IP addresses and CNAME records for subdomains.
Q: How do you configure HTTPS for a custom domain?
A: Enable Enforce HTTPS in Settings > Pages after setting up the custom domain.
Q: What branch is typically used for GitHub Pages?
A: The gh-pages branch, but you can also use the main or any other branch.
Q: How do you publish a GitHub Pages site from a specific folder?
A: Select the folder (e.g., /docs) as the source under Settings > Pages.